Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input: it8xxx2_kbd: add a kso-ignore-mask property #80684

Merged
merged 1 commit into from
Nov 16, 2024

Conversation

fabiobaltieri
Copy link
Member

The it8xxx2_kbd KSO pins can be used as both keyboard scan and GPIO. By default the keyboard scanning driver controls the output level of all the KSO signals from 0 to (col-size - 1), meaning that any line in between used as GPIO is going to have its output value overridden.

Add a kso-ignore-mask property to the keyboard scan driver to allow specifiying extra pins that should not be controlled by the driver.

@Dino-Li
Copy link
Contributor

Dino-Li commented Nov 4, 2024

Since we also set keyboard scan output registers in it8xxx2_kbd_init() function, please introduce the property into the function.

@fabiobaltieri
Copy link
Member Author

Since we also set keyboard scan output registers in it8xxx2_kbd_init() function, please introduce the property into the function.

Good point, thanks for spotting it. Done.

The it8xxx2_kbd KSO pins can be used as both keyboard scan and GPIO. By
default the keyboard scanning driver controls the output level of all
the KSO signals from 0 to (col-size - 1), meaning that any line in
between used as GPIO is going to have its output value overridden.

Add a kso-ignore-mask property to the keyboard scan driver to allow
specifiying extra pins that should not be controlled by the driver.

Signed-off-by: Fabio Baltieri <[email protected]>
Copy link
Collaborator

@bjarki-andreasen bjarki-andreasen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally prefer whitlisting signals rather than blacklisting everything else :) a default of 0xFFFF would be backwards compatible as well. Both solutions work though :)

@fabiobaltieri
Copy link
Member Author

fabiobaltieri commented Nov 11, 2024

I personally prefer whitlisting signals rather than blacklisting everything else :) a default of 0xFFFF would be backwards compatible as well. Both solutions work though :)

Interesting observation, this is for a bit of a hyper specific corner case that I'd be shocked if anyone else care about (we are messing with column 2... don't ask), it's just one bit so easier to read in the current form, plus the high significant ones are already left alone, depending on what col-size is set to, and in that case leaving other bits sets when they are not normally touch them may give the impression that they have to be cleared when they are not. Am I overthinking it? I'm probably overthinking it.

@nashif nashif merged commit d6013e7 into zephyrproject-rtos:main Nov 16, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Input Input Subsystem and Drivers platform: ITE ITE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants