-
Notifications
You must be signed in to change notification settings - Fork 7k
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
adc: Introduce mcux shim driver #804
Conversation
Remove repetitive dependencies on ADC and instead wrap everything in one big if. Jira: ZEP-1396 Signed-off-by: Maureen Helm <[email protected]>
The Kconfig assumed that there would only ever be one instance of an adc, but some Kinetis devices have multiple adc instances. Jira: ZEP-1396 Signed-off-by: Maureen Helm <[email protected]>
Adds common and Kinetis-specific adc device tree properties, and updates all Kinetis SoC and board dts files to include adc nodes. Jira: ZEP-1396 Signed-off-by: Maureen Helm <[email protected]>
Adds a shim layer around the mcux adc16 driver to adapt it to the Zephyr adc interface. Jira: ZEP-1396 Signed-off-by: Maureen Helm <[email protected]>
If the adc driver configuration is enabled (CONFIG_ADC=y), then enable the mcux shim driver by default for all Kinetis SoCs. Jira: ZEP-1396 Signed-off-by: Maureen Helm <[email protected]>
Enables a usable adc driver instance based on the board design and configures the pinmux to enable one adc channel on the SoC's PTB2 pin, which is routed to the Arduino header A2 pin. Updates the board documentation to reflect that the board now supports an adc driver. Jira: ZEP-1396 Signed-off-by: Maureen Helm <[email protected]>
Enables a usable adc driver instance based on the board design and configures the pinmux to enable one adc channel on the SoC's PTB2 pin, which is routed to the Arduino header A2 pin. Updates the board documentation to reflect that the board now supports an adc driver. Jira: ZEP-1396 Signed-off-by: Maureen Helm <[email protected]>
Enables a usable adc driver instance based on the board design and configures the pinmux to enable the SoC's PTB10 pin, which is routed to the Arduino header A2 pin. Updates the board documentation to reflect that the board now supports an adc driver. Jira: ZEP-1396 Signed-off-by: Maureen Helm <[email protected]>
Enables a usable adc driver instance based on the board design and configures the pinmux to enable the SoC's PTB1 pin, which is routed to the board's battery sense circuit. Updates the board documentation to reflect that the board now supports an adc driver. Jira: ZEP-1396 Signed-off-by: Maureen Helm <[email protected]>
Enables a usable adc driver instance based on the board design. No additional pinmux configuration is necessary because a dedicated adc pin is routed to the board's battery sense circuit. Updates the board documentation to reflect that the board now supports an adc driver. Jira: ZEP-1396 Signed-off-by: Maureen Helm <[email protected]>
Adds a Kconfig option and pinmuxing to enable the battery sense circuit. Jira: ZEP-1396 Signed-off-by: Maureen Helm <[email protected]>
Adds support for freedom and hexiwear boards to the adc_api test. Jira: ZEP-1396 Signed-off-by: Maureen Helm <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for doc changes
drivers/adc/Kconfig
Outdated
config ADC_MCUX_ADC16 | ||
bool "MCUX ADC16 driver" | ||
depends on HAS_MCUX && HAS_ADC16 | ||
select HAS_DTS_ADC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
select HAS_DTS_ADC should probably be added when you add the DTS support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look it in GitHub, but I actually added the dts first in the patch series before the driver. GitHub appears to show patches ordered by AuthorDate rather than CommitDate, so the fact that I originally implemented this driver without dts, amended it, and inserted a new commit adding dts before it, got GitHub a little confused.
- cleanup routine to free any open FD's Signed-off-by: James Prestwood <[email protected]>
Introduces a new mcux shim driver for the adc, and enables the driver on all Kinetis boards.