mxs-lradc: Split driver into MFD
Subsystems (6)
v14 cover mxs-lradc: Split driver into MFD
Split existing driver mxs-lradc into MFD with touchscreen and IIO part.
Tested on I.MX28.
Ksenija Stanojevic (5):
mfd: mxs-lradc: Add support for mxs-lradc MFD
iio: adc: mxs-lradc: Add support for adc driver
input: touchscreen: mxs-lradc: Add support for touchscreen
iio: adc: mxs-lradc: Remove driver
mfd: Move binding document
.../bindings/{iio/adc => mfd}/mxs-lradc.txt | 0
drivers/iio/adc/Kconfig | 27 +-
drivers/iio/adc/Makefile | 2 +-
drivers/iio/adc/mxs-lradc-adc.c | 843 ++++++++++
drivers/iio/adc/mxs-lradc.c | 1750 --------------------
drivers/input/touchscreen/Kconfig | 10 +
drivers/input/touchscreen/Makefile | 1 +
drivers/input/touchscreen/mxs-lradc-ts.c | 718 ++++++++
drivers/mfd/Kconfig | 17 +
drivers/mfd/Makefile | 1 +
drivers/mfd/mxs-lradc.c | 264 +++
include/linux/mfd/mxs-lradc.h | 187 +++
12 files changed, 2055 insertions(+), 1765 deletions(-)
rename Documentation/devicetree/bindings/{iio/adc => mfd}/mxs-lradc.txt (100%)
create mode 100644 drivers/iio/adc/mxs-lradc-adc.c
delete mode 100644 drivers/iio/adc/mxs-lradc.c
create mode 100644 drivers/input/touchscreen/mxs-lradc-ts.c
create mode 100644 drivers/mfd/mxs-lradc.c
create mode 100644 include/linux/mfd/mxs-lradc.hSignature · 1 line
1.9.1
PATCH v14 1/5 mfd: mxs-lradc: Add support for mxs-lradc MFD
Add core files for low resolution analog-to-digital converter (mxs-lradc) MFD driver.
---
Changes in v14:
- none
Changes in v13:
- none
Changes in v12:
- use BIT macro
Changes in v11:
- create static struct mfd_cells
- don't set platform data in mfd cells, set driver data instead
- remove mxs_lradc_reg_* functions, use writel function instead
Changes in v10:
- fetch base address from DT
- add a NULL check for of_match_device
Changes in v9:
- improve commit message.
Changes in v8:
- rebase onto 4.9-rc1
Changes in v7:
- define macros ADC_CELL and TSC_CELL
- remove one cell and dynamically set them in the switch()
- fail in the touchscreen driver instead of mfd driver if hardware doesn't contain a touchscreen
Changes in v6:
- update copyright
- add kernel-doc header for struct mxs-lradc
- add error message
- change EINVAL to ENODEV
- use PLATFORM_DEVID_NONE instead -1
- cosmetic fixes
Changes in v5:
- use DEFINE_RES_MEM
- don't pass ioreammaped adress to platform cells
- move comment outside of struct mxs_lradc
- change type of argument in mxs_lradc_reg_set, mxs_lradc_reg_clear, mxs_lradc_reg_wrt (struct mxs_lradc * -> void __iomem *)
Changes in v4:
- update copyright
- use DEFINE_RES_IRQ_NAMED
- remove mxs_lradc_add_device function
- use struct mfd_cell in static form
- improve spacing
- remove unnecessary comment
- remove platform_get_irq
- remove touch_ret and use ret instead
- rename use_touchscreen to touchscreen_wire
- use goto statements
- remove irq[13], irq_count and irq_name from struct mxs_lradc
- remove all defines from inside the struct definition
Changes in v3:
- add note to commit message
- move switch statement into if(touch_ret == 0) branch
- add MODULE_AUTHOR
Changes in v2:
- do not change spacing in Kconfig
- make struct mfd_cell part of struct mxs_lradc
- use switch instead of if in mxs_lradc_irq_mask
- use only necessary header files in mxs_lradc.h
- use devm_mfd_add_device
- use separate function to register mfd device
- change licence to GPL
- add copyright
drivers/mfd/Kconfig | 17 +++ drivers/mfd/Makefile | 1 + drivers/mfd/mxs-lradc.c | 264 ++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/mxs-lradc.h | 187 ++++++++++++++++++++++++++++++ 4 files changed, 469 insertions(+) create mode 100644 drivers/mfd/mxs-lradc.c create mode 100644 include/linux/mfd/mxs-lradc.h
drivers/mfd/Kconfig +17 -0
@@ -344,6 +344,23 @@ config MFD_MC13XXX_I2C help Select this if your MC13xxx is connected via an I2C bus. +config MFD_MXS_LRADC + tristate "Freescale i.MX23/i.MX28 LRADC" + depends on ARCH_MXS || COMPILE_TEST + select MFD_CORE + select STMP_DEVICE + help + Say yes here to build support for the Low Resolution + Analog-to-Digital Converter (LRADC) found on the i.MX23 and i.MX28 + processors. This driver provides common support for accessing the + device, additional drivers must be enabled in order to use the + functionality of the device: + mxs-lradc-adc for ADC readings + mxs-lradc-ts for touchscreen support + + This driver can also be built as a module. If so, the module will be + called mxs-lradc. + config MFD_MX25_TSADC tristate "Freescale i.MX25 integrated Touchscreen and ADC unit" select REGMAP_MMIO
drivers/mfd/Makefile +1 -0
@@ -215,3 +215,4 @@ obj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o obj-$(CONFIG_MFD_SUN4I_GPADC) += sun4i-gpadc.o obj-$(CONFIG_MFD_STM32_TIMERS) += stm32-timers.o +obj-$(CONFIG_MFD_MXS_LRADC) += mxs-lradc.o
drivers/mfd/mxs-lradc.c new file +264 -0
264 lines not on this page · raw message
include/linux/mfd/mxs-lradc.h new file +187 -0
187 lines not on this page · raw message
Signature · 1 line
1.9.1
Re: [PATCH v14 1/5] mfd: mxs-lradc: Add support for mxs-lradc MFD
Quoted 356 lines
Ksenija Stanojevic <[email protected]> hat am 1. März 2017 um 19:02 geschrieben:
Add core files for low resolution analog-to-digital converter (mxs-lradc) MFD driver.
Signed-off-by Ksenija Stanojevic <[email protected]>Acked-by Lee Jones <[email protected]>---
Changes in v14:
- noneChanges in v13:
- noneChanges in v12:
- use BIT macroChanges in v11:
- create static structmfd_cells
- don't set platform data in mfd cells, set driver data instead
- remove mxs_lradc_reg_* functions, use writel function insteadChanges in v10:
- fetch base address from DT
- add a NULL check forof_match_deviceChanges in v9:
- improve commit message.Changes in v8:
- rebase onto 4.9-rc1Changes in v7:
- define macrosADC_CELLandTSC_CELL
- remove one cell and dynamically set them in theswitch()
- fail in the touchscreen driver instead of mfd driver if hardware doesn't contain a touchscreenChanges in v6:
- update copyright
- add kernel-doc header for struct mxs-lradc
- add error message
- change EINVAL to ENODEV
- usePLATFORM_DEVID_NONEinstead -1
- cosmetic fixesChanges in v5:
- useDEFINE_RES_MEM
- don't pass ioreammaped adress to platform cells
- move comment outside of structmxs_lradc
- change type of argument inmxs_lradc_reg_set,mxs_lradc_reg_clear,mxs_lradc_reg_wrt(structmxs_lradc* -> void__iomem*)Changes in v4:
- update copyright
- useDEFINE_RES_IRQ_NAMED
- removemxs_lradc_add_devicefunction
- use structmfd_cellin static form
- improve spacing
- remove unnecessary comment
- removeplatform_get_irq
- removetouch_retand use ret instead
- renameuse_touchscreentotouchscreen_wire
- use goto statements
- remove irq[13],irq_countandirq_namefrom structmxs_lradc
- remove all defines from inside the struct definitionChanges in v3:
- add note to commit message
- move switch statement intoif(touch_ret == 0)branch
- addMODULE_AUTHORChanges in v2:
- do not change spacing inKconfig
- make structmfd_cellpart of structmxs_lradc
- use switch instead of if inmxs_lradc_irq_mask
- use only necessary header files inmxs_lradc.h
- usedevm_mfd_add_device
- use separate function to register mfd device
- change licence to GPL
- add copyrightdrivers/mfd/Kconfig | 17 +++ drivers/mfd/Makefile | 1 + drivers/mfd/mxs-lradc.c | 264 ++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/mxs-lradc.h | 187 ++++++++++++++++++++++++++++++ 4 files changed, 469 insertions(+) create mode 100644 drivers/mfd/mxs-lradc.c create mode 100644 include/linux/mfd/mxs-lradc.hdrivers/mfd/Kconfig +17
-0@@ -344,6 +344,23 @@ config MFD_MC13XXX_I2C help Select this if your MC13xxx is connected via an I2C bus. +config MFD_MXS_LRADC + tristate "Freescale i.MX23/i.MX28 LRADC" + depends on ARCH_MXS || COMPILE_TEST + select MFD_CORE + select STMP_DEVICE + help + Say yes here to build support for the Low Resolution + Analog-to-Digital Converter (LRADC) found on the i.MX23 and i.MX28 + processors. This driver provides common support for accessing the + device, additional drivers must be enabled in order to use the + functionality of the device: + mxs-lradc-adc for ADC readings + mxs-lradc-ts for touchscreen support + + This driver can also be built as a module. If so, the module will be + called mxs-lradc. + config MFD_MX25_TSADC tristate "Freescale i.MX25 integrated Touchscreen and ADC unit" select REGMAP_MMIOdrivers/mfd/Makefile +1
-0@@ -215,3 +215,4 @@ obj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o obj-$(CONFIG_MFD_SUN4I_GPADC) += sun4i-gpadc.o obj-$(CONFIG_MFD_STM32_TIMERS) += stm32-timers.o +obj-$(CONFIG_MFD_MXS_LRADC) += mxs-lradc.odrivers/mfd/mxs-lradc.c new file +222
-0@@ -0,0 +1,264 @@ +/* +* Freescale MXS Low Resolution Analog-to-Digital Converter driver +* +* Copyright (c) 2012 DENX Software Engineering, GmbH. +* Copyright (c) 2017 Ksenija Stanojevic <[email protected]> +* +* Authors: +* Marek Vasut <[email protected]> +* Ksenija Stanojevic <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include <linux/clk.h> +#include <linux/device.h> +#include <linux/mfd/core.h> +#include <linux/mfd/mxs-lradc.h> +#include <linux/module.h> +#include <linux/of.h> +#include <linux/of_device.h> +#include <linux/platform_device.h> +#include <linux/slab.h> + +#define ADC_CELL 0 +#define TSC_CELL 1 +#define RES_MEM 0 + +enum mx23_lradc_irqs { +MX23_LRADC_TS_IRQ =0 , +MX23_LRADC_CH0_IRQ , +MX23_LRADC_CH1_IRQ , +MX23_LRADC_CH2_IRQ , +MX23_LRADC_CH3_IRQ , +MX23_LRADC_CH4_IRQ , +MX23_LRADC_CH5_IRQ , +MX23_LRADC_CH6_IRQ , +MX23_LRADC_CH7_IRQ , +}; + +enum mx28_lradc_irqs { +MX28_LRADC_TS_IRQ =0 , +MX28_LRADC_TRESH0_IRQ , +MX28_LRADC_TRESH1_IRQ , +MX28_LRADC_CH0_IRQ , +MX28_LRADC_CH1_IRQ , +MX28_LRADC_CH2_IRQ , +MX28_LRADC_CH3_IRQ , +MX28_LRADC_CH4_IRQ , +MX28_LRADC_CH5_IRQ , +MX28_LRADC_CH6_IRQ , +MX28_LRADC_CH7_IRQ , +MX28_LRADC_BUTTON0_IRQ , +MX28_LRADC_BUTTON1_IRQ , +}; + +static struct resource mx23_adc_resources[] = { +DEFINE_RES_MEM (0x0 ,0x0 ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH0_IRQ ,"mxs-lradc-channel0" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH1_IRQ ,"mxs-lradc-channel1" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH2_IRQ ,"mxs-lradc-channel2" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH3_IRQ ,"mxs-lradc-channel3" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH4_IRQ ,"mxs-lradc-channel4" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH5_IRQ ,"mxs-lradc-channel5" ), +}; + +static struct resource mx23_touchscreen_resources[] = { +DEFINE_RES_MEM (0x0 ,0x0 ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_TS_IRQ ,"mxs-lradc-touchscreen" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH6_IRQ ,"mxs-lradc-channel6" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH7_IRQ ,"mxs-lradc-channel7" ), +}; + +static struct resource mx28_adc_resources[] = { +DEFINE_RES_MEM (0x0 ,0x0 ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_TRESH0_IRQ ,"mxs-lradc-thresh0" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_TRESH1_IRQ ,"mxs-lradc-thresh1" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH0_IRQ ,"mxs-lradc-channel0" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH1_IRQ ,"mxs-lradc-channel1" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH2_IRQ ,"mxs-lradc-channel2" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH3_IRQ ,"mxs-lradc-channel3" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH4_IRQ ,"mxs-lradc-channel4" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH5_IRQ ,"mxs-lradc-channel5" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_BUTTON0_IRQ ,"mxs-lradc-button0" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_BUTTON1_IRQ ,"mxs-lradc-button1" ), +}; + +static struct resource mx28_touchscreen_resources[] = { +DEFINE_RES_MEM (0x0 ,0x0 ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_TS_IRQ ,"mxs-lradc-touchscreen" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH6_IRQ ,"mxs-lradc-channel6" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH7_IRQ ,"mxs-lradc-channel7" ), +}; + +static struct mfd_cell mx23_cells[] = { + { + .name ="mxs-lradc-adc" , + .resources = mx23_adc_resources, + .num_resources =ARRAY_SIZE (mx23_adc_resources), + }, + { + .name ="mxs-lradc-ts" , + .resources = mx23_touchscreen_resources, + .num_resources =ARRAY_SIZE (mx23_touchscreen_resources), + }, +}; + +static struct mfd_cell mx28_cells[] = { + { + .name ="mxs-lradc-adc" , + .resources = mx28_adc_resources, + .num_resources =ARRAY_SIZE (mx28_adc_resources), + }, + { + .name ="mxs-lradc-ts" , + .resources = mx28_touchscreen_resources, + .num_resources =ARRAY_SIZE (mx28_touchscreen_resources), + } +}; + +static const struct of_device_id mxs_lradc_dt_ids[] = { + { .compatible ="fsl,imx23-lradc" , .data = (void *)IMX23_LRADC , }, + { .compatible ="fsl,imx28-lradc" , .data = (void *)IMX28_LRADC , }, + {/* sentinel */ } +}; +MODULE_DEVICE_TABLE (of, mxs_lradc_dt_ids); + +static int mxs_lradc_probe (struct platform_device *pdev) +{ +const struct of_device_id *of_id; +struct device *dev = &pdev->dev; +struct device_node *node = dev->of_node; +struct mxs_lradc *lradc; +struct mfd_cell *cells =NULL ; +struct resource *res; +int ret =0 ; +u32 ts_wires =0 ; + + lradc =devm_kzalloc (&pdev->dev,sizeof (*lradc),GFP_KERNEL ); +if (!lradc) +return -ENOMEM ; + + of_id =of_match_device (mxs_lradc_dt_ids, &pdev->dev); +if (!of_id) +return -EINVAL ; + + lradc->soc = (enum mxs_lradc_id )of_id->data; + + lradc->clk =devm_clk_get (&pdev->dev,NULL ); +if (IS_ERR (lradc->clk)) { +dev_err (dev,"Failed to get the delay unit clock\n" ); +return PTR_ERR (lradc->clk); + } + + ret =clk_prepare_enable (lradc->clk); +if (ret) { +dev_err (dev,"Failed to enable the delay unit clock\n" ); +return ret; + } + + ret =of_property_read_u32 (node,"fsl,lradc-touchscreen-wires" , + &ts_wires); + +if (!ret) { + lradc->buffer_vchans =BUFFER_VCHANS_LIMITED ; + +switch (ts_wires) { +case 4 : + lradc->touchscreen_wire =MXS_LRADC_TOUCHSCREEN_4WIRE ; +break ; +case 5 : +if (lradc->soc ==IMX28_LRADC ) { + lradc->touchscreen_wire = +MXS_LRADC_TOUCHSCREEN_5WIRE ; +break ; + } +/* fall through to an error message for i.MX23 */ +default : +dev_err (&pdev->dev, +"Unsupported number of touchscreen wires (%d)\n" + , ts_wires); + ret = -EINVAL ; + goto err_clk; + } + }else { + lradc->buffer_vchans =BUFFER_VCHANS_ALL ; + } + +platform_set_drvdata (pdev, lradc); + + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (!res) +return -ENOMEM ; + +switch (lradc->soc) { +case IMX23_LRADC : + mx23_adc_resources[RES_MEM ] = *res; + mx23_touchscreen_resources[RES_MEM ] = *res; + cells = mx23_cells; +break ; +case IMX28_LRADC : + mx28_adc_resources[RES_MEM ] = *res; + mx28_touchscreen_resources[RES_MEM ] = *res; + cells = mx28_cells; +break ; +default : +dev_err (dev,"Unsupported SoC\n" ); + ret = -ENODEV ; + goto err_clk; + } + + ret =devm_mfd_add_devices (&pdev->dev,PLATFORM_DEVID_NONE , + &cells[ADC_CELL ],1 ,NULL ,0 ,NULL ); +if (ret) { +dev_err (&pdev->dev,"Failed to add the ADC subdevice\n" );
drivers/mfd/mxs-lradc.c line 232
Quoted 10 lines
drivers/mfd/mxs-lradc.c new file +10
-0+ goto err_clk; + } + + ret =devm_mfd_add_devices (&pdev->dev,PLATFORM_DEVID_NONE , + &cells[TSC_CELL ],1 ,NULL ,0 ,NULL ); +if (ret) { +dev_err (&pdev->dev, +"Failed to add the touchscreen subdevice\n" ); + goto err_clk; + }
Since touchscreen is optional it doesn't make to try to register it, notice in the touchscreen driver there is no touchscreen, give the user a confusing error and finally disable the clock.
Here are my suggestions:
1) Use the solution from Patch V6 but with an explaining comment that touchscreen is optional
if (!lradc->touchscreen_wire)
return 0;
2) Return a special error from touchscreen registration so mfd knowns this result is expected.
I'm open for better solutions.
@Lee: What's your opinion?
Dmitry Torokhov
maintainerRe: [PATCH v14 1/5] mfd: mxs-lradc: Add support for mxs-lradc MFD
Quoted 373 lines · Stefan Wahren
Quoted 356 lines
Ksenija Stanojevic <[email protected]> hat am 1. März 2017 um 19:02 geschrieben:
Add core files for low resolution analog-to-digital converter (mxs-lradc) MFD driver.
Signed-off-by Ksenija Stanojevic <[email protected]>Acked-by Lee Jones <[email protected]>---
Changes in v14:
- noneChanges in v13:
- noneChanges in v12:
- use BIT macroChanges in v11:
- create static structmfd_cells
- don't set platform data in mfd cells, set driver data instead
- remove mxs_lradc_reg_* functions, use writel function insteadChanges in v10:
- fetch base address from DT
- add a NULL check forof_match_deviceChanges in v9:
- improve commit message.Changes in v8:
- rebase onto 4.9-rc1Changes in v7:
- define macrosADC_CELLandTSC_CELL
- remove one cell and dynamically set them in theswitch()
- fail in the touchscreen driver instead of mfd driver if hardware doesn't contain a touchscreenChanges in v6:
- update copyright
- add kernel-doc header for struct mxs-lradc
- add error message
- change EINVAL to ENODEV
- usePLATFORM_DEVID_NONEinstead -1
- cosmetic fixesChanges in v5:
- useDEFINE_RES_MEM
- don't pass ioreammaped adress to platform cells
- move comment outside of structmxs_lradc
- change type of argument inmxs_lradc_reg_set,mxs_lradc_reg_clear,mxs_lradc_reg_wrt(structmxs_lradc* -> void__iomem*)Changes in v4:
- update copyright
- useDEFINE_RES_IRQ_NAMED
- removemxs_lradc_add_devicefunction
- use structmfd_cellin static form
- improve spacing
- remove unnecessary comment
- removeplatform_get_irq
- removetouch_retand use ret instead
- renameuse_touchscreentotouchscreen_wire
- use goto statements
- remove irq[13],irq_countandirq_namefrom structmxs_lradc
- remove all defines from inside the struct definitionChanges in v3:
- add note to commit message
- move switch statement intoif(touch_ret == 0)branch
- addMODULE_AUTHORChanges in v2:
- do not change spacing inKconfig
- make structmfd_cellpart of structmxs_lradc
- use switch instead of if inmxs_lradc_irq_mask
- use only necessary header files inmxs_lradc.h
- usedevm_mfd_add_device
- use separate function to register mfd device
- change licence to GPL
- add copyrightdrivers/mfd/Kconfig | 17 +++ drivers/mfd/Makefile | 1 + drivers/mfd/mxs-lradc.c | 264 ++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/mxs-lradc.h | 187 ++++++++++++++++++++++++++++++ 4 files changed, 469 insertions(+) create mode 100644 drivers/mfd/mxs-lradc.c create mode 100644 include/linux/mfd/mxs-lradc.hdrivers/mfd/Kconfig +17
-0@@ -344,6 +344,23 @@ config MFD_MC13XXX_I2C help Select this if your MC13xxx is connected via an I2C bus. +config MFD_MXS_LRADC + tristate "Freescale i.MX23/i.MX28 LRADC" + depends on ARCH_MXS || COMPILE_TEST + select MFD_CORE + select STMP_DEVICE + help + Say yes here to build support for the Low Resolution + Analog-to-Digital Converter (LRADC) found on the i.MX23 and i.MX28 + processors. This driver provides common support for accessing the + device, additional drivers must be enabled in order to use the + functionality of the device: + mxs-lradc-adc for ADC readings + mxs-lradc-ts for touchscreen support + + This driver can also be built as a module. If so, the module will be + called mxs-lradc. + config MFD_MX25_TSADC tristate "Freescale i.MX25 integrated Touchscreen and ADC unit" select REGMAP_MMIOdrivers/mfd/Makefile +1
-0@@ -215,3 +215,4 @@ obj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o obj-$(CONFIG_MFD_SUN4I_GPADC) += sun4i-gpadc.o obj-$(CONFIG_MFD_STM32_TIMERS) += stm32-timers.o +obj-$(CONFIG_MFD_MXS_LRADC) += mxs-lradc.odrivers/mfd/mxs-lradc.c new file +222
-0@@ -0,0 +1,264 @@ +/* +* Freescale MXS Low Resolution Analog-to-Digital Converter driver +* +* Copyright (c) 2012 DENX Software Engineering, GmbH. +* Copyright (c) 2017 Ksenija Stanojevic <[email protected]> +* +* Authors: +* Marek Vasut <[email protected]> +* Ksenija Stanojevic <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include <linux/clk.h> +#include <linux/device.h> +#include <linux/mfd/core.h> +#include <linux/mfd/mxs-lradc.h> +#include <linux/module.h> +#include <linux/of.h> +#include <linux/of_device.h> +#include <linux/platform_device.h> +#include <linux/slab.h> + +#define ADC_CELL 0 +#define TSC_CELL 1 +#define RES_MEM 0 + +enum mx23_lradc_irqs { +MX23_LRADC_TS_IRQ =0 , +MX23_LRADC_CH0_IRQ , +MX23_LRADC_CH1_IRQ , +MX23_LRADC_CH2_IRQ , +MX23_LRADC_CH3_IRQ , +MX23_LRADC_CH4_IRQ , +MX23_LRADC_CH5_IRQ , +MX23_LRADC_CH6_IRQ , +MX23_LRADC_CH7_IRQ , +}; + +enum mx28_lradc_irqs { +MX28_LRADC_TS_IRQ =0 , +MX28_LRADC_TRESH0_IRQ , +MX28_LRADC_TRESH1_IRQ , +MX28_LRADC_CH0_IRQ , +MX28_LRADC_CH1_IRQ , +MX28_LRADC_CH2_IRQ , +MX28_LRADC_CH3_IRQ , +MX28_LRADC_CH4_IRQ , +MX28_LRADC_CH5_IRQ , +MX28_LRADC_CH6_IRQ , +MX28_LRADC_CH7_IRQ , +MX28_LRADC_BUTTON0_IRQ , +MX28_LRADC_BUTTON1_IRQ , +}; + +static struct resource mx23_adc_resources[] = { +DEFINE_RES_MEM (0x0 ,0x0 ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH0_IRQ ,"mxs-lradc-channel0" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH1_IRQ ,"mxs-lradc-channel1" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH2_IRQ ,"mxs-lradc-channel2" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH3_IRQ ,"mxs-lradc-channel3" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH4_IRQ ,"mxs-lradc-channel4" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH5_IRQ ,"mxs-lradc-channel5" ), +}; + +static struct resource mx23_touchscreen_resources[] = { +DEFINE_RES_MEM (0x0 ,0x0 ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_TS_IRQ ,"mxs-lradc-touchscreen" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH6_IRQ ,"mxs-lradc-channel6" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH7_IRQ ,"mxs-lradc-channel7" ), +}; + +static struct resource mx28_adc_resources[] = { +DEFINE_RES_MEM (0x0 ,0x0 ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_TRESH0_IRQ ,"mxs-lradc-thresh0" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_TRESH1_IRQ ,"mxs-lradc-thresh1" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH0_IRQ ,"mxs-lradc-channel0" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH1_IRQ ,"mxs-lradc-channel1" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH2_IRQ ,"mxs-lradc-channel2" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH3_IRQ ,"mxs-lradc-channel3" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH4_IRQ ,"mxs-lradc-channel4" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH5_IRQ ,"mxs-lradc-channel5" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_BUTTON0_IRQ ,"mxs-lradc-button0" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_BUTTON1_IRQ ,"mxs-lradc-button1" ), +}; + +static struct resource mx28_touchscreen_resources[] = { +DEFINE_RES_MEM (0x0 ,0x0 ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_TS_IRQ ,"mxs-lradc-touchscreen" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH6_IRQ ,"mxs-lradc-channel6" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH7_IRQ ,"mxs-lradc-channel7" ), +}; + +static struct mfd_cell mx23_cells[] = { + { + .name ="mxs-lradc-adc" , + .resources = mx23_adc_resources, + .num_resources =ARRAY_SIZE (mx23_adc_resources), + }, + { + .name ="mxs-lradc-ts" , + .resources = mx23_touchscreen_resources, + .num_resources =ARRAY_SIZE (mx23_touchscreen_resources), + }, +}; + +static struct mfd_cell mx28_cells[] = { + { + .name ="mxs-lradc-adc" , + .resources = mx28_adc_resources, + .num_resources =ARRAY_SIZE (mx28_adc_resources), + }, + { + .name ="mxs-lradc-ts" , + .resources = mx28_touchscreen_resources, + .num_resources =ARRAY_SIZE (mx28_touchscreen_resources), + } +}; + +static const struct of_device_id mxs_lradc_dt_ids[] = { + { .compatible ="fsl,imx23-lradc" , .data = (void *)IMX23_LRADC , }, + { .compatible ="fsl,imx28-lradc" , .data = (void *)IMX28_LRADC , }, + {/* sentinel */ } +}; +MODULE_DEVICE_TABLE (of, mxs_lradc_dt_ids); + +static int mxs_lradc_probe (struct platform_device *pdev) +{ +const struct of_device_id *of_id; +struct device *dev = &pdev->dev; +struct device_node *node = dev->of_node; +struct mxs_lradc *lradc; +struct mfd_cell *cells =NULL ; +struct resource *res; +int ret =0 ; +u32 ts_wires =0 ; + + lradc =devm_kzalloc (&pdev->dev,sizeof (*lradc),GFP_KERNEL ); +if (!lradc) +return -ENOMEM ; + + of_id =of_match_device (mxs_lradc_dt_ids, &pdev->dev); +if (!of_id) +return -EINVAL ; + + lradc->soc = (enum mxs_lradc_id )of_id->data; + + lradc->clk =devm_clk_get (&pdev->dev,NULL ); +if (IS_ERR (lradc->clk)) { +dev_err (dev,"Failed to get the delay unit clock\n" ); +return PTR_ERR (lradc->clk); + } + + ret =clk_prepare_enable (lradc->clk); +if (ret) { +dev_err (dev,"Failed to enable the delay unit clock\n" ); +return ret; + } + + ret =of_property_read_u32 (node,"fsl,lradc-touchscreen-wires" , + &ts_wires); + +if (!ret) { + lradc->buffer_vchans =BUFFER_VCHANS_LIMITED ; + +switch (ts_wires) { +case 4 : + lradc->touchscreen_wire =MXS_LRADC_TOUCHSCREEN_4WIRE ; +break ; +case 5 : +if (lradc->soc ==IMX28_LRADC ) { + lradc->touchscreen_wire = +MXS_LRADC_TOUCHSCREEN_5WIRE ; +break ; + } +/* fall through to an error message for i.MX23 */ +default : +dev_err (&pdev->dev, +"Unsupported number of touchscreen wires (%d)\n" + , ts_wires); + ret = -EINVAL ; + goto err_clk; + } + }else { + lradc->buffer_vchans =BUFFER_VCHANS_ALL ; + } + +platform_set_drvdata (pdev, lradc); + + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (!res) +return -ENOMEM ; + +switch (lradc->soc) { +case IMX23_LRADC : + mx23_adc_resources[RES_MEM ] = *res; + mx23_touchscreen_resources[RES_MEM ] = *res; + cells = mx23_cells; +break ; +case IMX28_LRADC : + mx28_adc_resources[RES_MEM ] = *res; + mx28_touchscreen_resources[RES_MEM ] = *res; + cells = mx28_cells; +break ; +default : +dev_err (dev,"Unsupported SoC\n" ); + ret = -ENODEV ; + goto err_clk; + } + + ret =devm_mfd_add_devices (&pdev->dev,PLATFORM_DEVID_NONE , + &cells[ADC_CELL ],1 ,NULL ,0 ,NULL ); +if (ret) { +dev_err (&pdev->dev,"Failed to add the ADC subdevice\n" );drivers/mfd/mxs-lradc.c line 232
Quoted 10 lines
drivers/mfd/mxs-lradc.c new file +10
-0+ goto err_clk; + } + + ret =devm_mfd_add_devices (&pdev->dev,PLATFORM_DEVID_NONE , + &cells[TSC_CELL ],1 ,NULL ,0 ,NULL ); +if (ret) { +dev_err (&pdev->dev, +"Failed to add the touchscreen subdevice\n" ); + goto err_clk; + }Since touchscreen is optional it doesn't make to try to register it, notice in the touchscreen driver there is no touchscreen, give the user a confusing error and finally disable the clock.
Here are my suggestions:
1) Use the solution from Patch V6 but with an explaining comment that touchscreen is optional
Quoted 8 lines
if (!lradc->touchscreen_wire)
return 0;2) Return a special error from touchscreen registration so mfd knowns this result is expected.
I'm open for better solutions.
@Lee: What's your opinion?
I am not Lee, but given that this module already parses touchscreen properties and knows whether there is touchscreen or not, #1 seems simple and logical.
Thanks.
Signature · 1 line
Dmitry
Re: [PATCH v14 1/5] mfd: mxs-lradc: Add support for mxs-lradc MFD
Quoted 379 lines · Dmitry Torokhov
Quoted 378 lines · Stefan Wahren
Quoted 356 lines
Ksenija Stanojevic <[email protected]> hat am 1. März 2017 um 19:02 geschrieben:
Add core files for low resolution analog-to-digital converter (mxs-lradc) MFD driver.
Signed-off-by Ksenija Stanojevic <[email protected]>Acked-by Lee Jones <[email protected]>---
Changes in v14:
- noneChanges in v13:
- noneChanges in v12:
- use BIT macroChanges in v11:
- create static structmfd_cells
- don't set platform data in mfd cells, set driver data instead
- remove mxs_lradc_reg_* functions, use writel function insteadChanges in v10:
- fetch base address from DT
- add a NULL check forof_match_deviceChanges in v9:
- improve commit message.Changes in v8:
- rebase onto 4.9-rc1Changes in v7:
- define macrosADC_CELLandTSC_CELL
- remove one cell and dynamically set them in theswitch()
- fail in the touchscreen driver instead of mfd driver if hardware doesn't contain a touchscreenChanges in v6:
- update copyright
- add kernel-doc header for struct mxs-lradc
- add error message
- change EINVAL to ENODEV
- usePLATFORM_DEVID_NONEinstead -1
- cosmetic fixesChanges in v5:
- useDEFINE_RES_MEM
- don't pass ioreammaped adress to platform cells
- move comment outside of structmxs_lradc
- change type of argument inmxs_lradc_reg_set,mxs_lradc_reg_clear,mxs_lradc_reg_wrt(structmxs_lradc* -> void__iomem*)Changes in v4:
- update copyright
- useDEFINE_RES_IRQ_NAMED
- removemxs_lradc_add_devicefunction
- use structmfd_cellin static form
- improve spacing
- remove unnecessary comment
- removeplatform_get_irq
- removetouch_retand use ret instead
- renameuse_touchscreentotouchscreen_wire
- use goto statements
- remove irq[13],irq_countandirq_namefrom structmxs_lradc
- remove all defines from inside the struct definitionChanges in v3:
- add note to commit message
- move switch statement intoif(touch_ret == 0)branch
- addMODULE_AUTHORChanges in v2:
- do not change spacing inKconfig
- make structmfd_cellpart of structmxs_lradc
- use switch instead of if inmxs_lradc_irq_mask
- use only necessary header files inmxs_lradc.h
- usedevm_mfd_add_device
- use separate function to register mfd device
- change licence to GPL
- add copyrightdrivers/mfd/Kconfig | 17 +++ drivers/mfd/Makefile | 1 + drivers/mfd/mxs-lradc.c | 264 ++++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/mxs-lradc.h | 187 ++++++++++++++++++++++++++++++ 4 files changed, 469 insertions(+) create mode 100644 drivers/mfd/mxs-lradc.c create mode 100644 include/linux/mfd/mxs-lradc.hdrivers/mfd/Kconfig +17
-0@@ -344,6 +344,23 @@ config MFD_MC13XXX_I2C help Select this if your MC13xxx is connected via an I2C bus. +config MFD_MXS_LRADC + tristate "Freescale i.MX23/i.MX28 LRADC" + depends on ARCH_MXS || COMPILE_TEST + select MFD_CORE + select STMP_DEVICE + help + Say yes here to build support for the Low Resolution + Analog-to-Digital Converter (LRADC) found on the i.MX23 and i.MX28 + processors. This driver provides common support for accessing the + device, additional drivers must be enabled in order to use the + functionality of the device: + mxs-lradc-adc for ADC readings + mxs-lradc-ts for touchscreen support + + This driver can also be built as a module. If so, the module will be + called mxs-lradc. + config MFD_MX25_TSADC tristate "Freescale i.MX25 integrated Touchscreen and ADC unit" select REGMAP_MMIOdrivers/mfd/Makefile +1
-0@@ -215,3 +215,4 @@ obj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o obj-$(CONFIG_MFD_SUN4I_GPADC) += sun4i-gpadc.o obj-$(CONFIG_MFD_STM32_TIMERS) += stm32-timers.o +obj-$(CONFIG_MFD_MXS_LRADC) += mxs-lradc.odrivers/mfd/mxs-lradc.c new file +222
-0@@ -0,0 +1,264 @@ +/* +* Freescale MXS Low Resolution Analog-to-Digital Converter driver +* +* Copyright (c) 2012 DENX Software Engineering, GmbH. +* Copyright (c) 2017 Ksenija Stanojevic <[email protected]> +* +* Authors: +* Marek Vasut <[email protected]> +* Ksenija Stanojevic <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +*/ + +#include <linux/clk.h> +#include <linux/device.h> +#include <linux/mfd/core.h> +#include <linux/mfd/mxs-lradc.h> +#include <linux/module.h> +#include <linux/of.h> +#include <linux/of_device.h> +#include <linux/platform_device.h> +#include <linux/slab.h> + +#define ADC_CELL 0 +#define TSC_CELL 1 +#define RES_MEM 0 + +enum mx23_lradc_irqs { +MX23_LRADC_TS_IRQ =0 , +MX23_LRADC_CH0_IRQ , +MX23_LRADC_CH1_IRQ , +MX23_LRADC_CH2_IRQ , +MX23_LRADC_CH3_IRQ , +MX23_LRADC_CH4_IRQ , +MX23_LRADC_CH5_IRQ , +MX23_LRADC_CH6_IRQ , +MX23_LRADC_CH7_IRQ , +}; + +enum mx28_lradc_irqs { +MX28_LRADC_TS_IRQ =0 , +MX28_LRADC_TRESH0_IRQ , +MX28_LRADC_TRESH1_IRQ , +MX28_LRADC_CH0_IRQ , +MX28_LRADC_CH1_IRQ , +MX28_LRADC_CH2_IRQ , +MX28_LRADC_CH3_IRQ , +MX28_LRADC_CH4_IRQ , +MX28_LRADC_CH5_IRQ , +MX28_LRADC_CH6_IRQ , +MX28_LRADC_CH7_IRQ , +MX28_LRADC_BUTTON0_IRQ , +MX28_LRADC_BUTTON1_IRQ , +}; + +static struct resource mx23_adc_resources[] = { +DEFINE_RES_MEM (0x0 ,0x0 ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH0_IRQ ,"mxs-lradc-channel0" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH1_IRQ ,"mxs-lradc-channel1" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH2_IRQ ,"mxs-lradc-channel2" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH3_IRQ ,"mxs-lradc-channel3" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH4_IRQ ,"mxs-lradc-channel4" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH5_IRQ ,"mxs-lradc-channel5" ), +}; + +static struct resource mx23_touchscreen_resources[] = { +DEFINE_RES_MEM (0x0 ,0x0 ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_TS_IRQ ,"mxs-lradc-touchscreen" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH6_IRQ ,"mxs-lradc-channel6" ), +DEFINE_RES_IRQ_NAMED (MX23_LRADC_CH7_IRQ ,"mxs-lradc-channel7" ), +}; + +static struct resource mx28_adc_resources[] = { +DEFINE_RES_MEM (0x0 ,0x0 ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_TRESH0_IRQ ,"mxs-lradc-thresh0" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_TRESH1_IRQ ,"mxs-lradc-thresh1" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH0_IRQ ,"mxs-lradc-channel0" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH1_IRQ ,"mxs-lradc-channel1" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH2_IRQ ,"mxs-lradc-channel2" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH3_IRQ ,"mxs-lradc-channel3" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH4_IRQ ,"mxs-lradc-channel4" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH5_IRQ ,"mxs-lradc-channel5" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_BUTTON0_IRQ ,"mxs-lradc-button0" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_BUTTON1_IRQ ,"mxs-lradc-button1" ), +}; + +static struct resource mx28_touchscreen_resources[] = { +DEFINE_RES_MEM (0x0 ,0x0 ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_TS_IRQ ,"mxs-lradc-touchscreen" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH6_IRQ ,"mxs-lradc-channel6" ), +DEFINE_RES_IRQ_NAMED (MX28_LRADC_CH7_IRQ ,"mxs-lradc-channel7" ), +}; + +static struct mfd_cell mx23_cells[] = { + { + .name ="mxs-lradc-adc" , + .resources = mx23_adc_resources, + .num_resources =ARRAY_SIZE (mx23_adc_resources), + }, + { + .name ="mxs-lradc-ts" , + .resources = mx23_touchscreen_resources, + .num_resources =ARRAY_SIZE (mx23_touchscreen_resources), + }, +}; + +static struct mfd_cell mx28_cells[] = { + { + .name ="mxs-lradc-adc" , + .resources = mx28_adc_resources, + .num_resources =ARRAY_SIZE (mx28_adc_resources), + }, + { + .name ="mxs-lradc-ts" , + .resources = mx28_touchscreen_resources, + .num_resources =ARRAY_SIZE (mx28_touchscreen_resources), + } +}; + +static const struct of_device_id mxs_lradc_dt_ids[] = { + { .compatible ="fsl,imx23-lradc" , .data = (void *)IMX23_LRADC , }, + { .compatible ="fsl,imx28-lradc" , .data = (void *)IMX28_LRADC , }, + {/* sentinel */ } +}; +MODULE_DEVICE_TABLE (of, mxs_lradc_dt_ids); + +static int mxs_lradc_probe (struct platform_device *pdev) +{ +const struct of_device_id *of_id; +struct device *dev = &pdev->dev; +struct device_node *node = dev->of_node; +struct mxs_lradc *lradc; +struct mfd_cell *cells =NULL ; +struct resource *res; +int ret =0 ; +u32 ts_wires =0 ; + + lradc =devm_kzalloc (&pdev->dev,sizeof (*lradc),GFP_KERNEL ); +if (!lradc) +return -ENOMEM ; + + of_id =of_match_device (mxs_lradc_dt_ids, &pdev->dev); +if (!of_id) +return -EINVAL ; + + lradc->soc = (enum mxs_lradc_id )of_id->data; + + lradc->clk =devm_clk_get (&pdev->dev,NULL ); +if (IS_ERR (lradc->clk)) { +dev_err (dev,"Failed to get the delay unit clock\n" ); +return PTR_ERR (lradc->clk); + } + + ret =clk_prepare_enable (lradc->clk); +if (ret) { +dev_err (dev,"Failed to enable the delay unit clock\n" ); +return ret; + } + + ret =of_property_read_u32 (node,"fsl,lradc-touchscreen-wires" , + &ts_wires); + +if (!ret) { + lradc->buffer_vchans =BUFFER_VCHANS_LIMITED ; + +switch (ts_wires) { +case 4 : + lradc->touchscreen_wire =MXS_LRADC_TOUCHSCREEN_4WIRE ; +break ; +case 5 : +if (lradc->soc ==IMX28_LRADC ) { + lradc->touchscreen_wire = +MXS_LRADC_TOUCHSCREEN_5WIRE ; +break ; + } +/* fall through to an error message for i.MX23 */ +default : +dev_err (&pdev->dev, +"Unsupported number of touchscreen wires (%d)\n" + , ts_wires); + ret = -EINVAL ; + goto err_clk; + } + }else { + lradc->buffer_vchans =BUFFER_VCHANS_ALL ; + } + +platform_set_drvdata (pdev, lradc); + + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (!res) +return -ENOMEM ; + +switch (lradc->soc) { +case IMX23_LRADC : + mx23_adc_resources[RES_MEM ] = *res; + mx23_touchscreen_resources[RES_MEM ] = *res; + cells = mx23_cells; +break ; +case IMX28_LRADC : + mx28_adc_resources[RES_MEM ] = *res; + mx28_touchscreen_resources[RES_MEM ] = *res; + cells = mx28_cells; +break ; +default : +dev_err (dev,"Unsupported SoC\n" ); + ret = -ENODEV ; + goto err_clk; + } + + ret =devm_mfd_add_devices (&pdev->dev,PLATFORM_DEVID_NONE , + &cells[ADC_CELL ],1 ,NULL ,0 ,NULL ); +if (ret) { +dev_err (&pdev->dev,"Failed to add the ADC subdevice\n" );drivers/mfd/mxs-lradc.c line 232
Quoted 10 lines
drivers/mfd/mxs-lradc.c new file +10
-0+ goto err_clk; + } + + ret =devm_mfd_add_devices (&pdev->dev,PLATFORM_DEVID_NONE , + &cells[TSC_CELL ],1 ,NULL ,0 ,NULL ); +if (ret) { +dev_err (&pdev->dev, +"Failed to add the touchscreen subdevice\n" ); + goto err_clk; + }Since touchscreen is optional it doesn't make to try to register it, notice in the touchscreen driver there is no touchscreen, give the user a confusing error and finally disable the clock.
Here are my suggestions:
1) Use the solution from Patch V6 but with an explaining comment that touchscreen is optional
if (!lradc->touchscreen_wire)
return 0;2) Return a special error from touchscreen registration so mfd knowns this result is expected.
Quoted 7 lines
Quoted 3 lines
I'm open for better solutions.
@Lee: What's your opinion?
I am not Lee, but given that this module already parses touchscreen properties and knows whether there is touchscreen or not, #1 seems simple and logical.
Sorry for the delay, I'm currently behind on my mail due to vacation and conferences.
+1
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v14 1/5] mfd: mxs-lradc: Add support for mxs-lradc MFD
Hi Ksenija,
Quoted 6 lines
Lee Jones <[email protected]> hat am 14. März 2017 um 12:05 geschrieben:
Quoted 1 line · Dmitry Torokhov
On Wed, Mar 01, 2017 at 09:10:50PM +0100, Stefan Wahren wrote:
...
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
Since touchscreen is optional it doesn't make to try to register it, notice in the touchscreen driver there is no touchscreen, give the user a confusing error and finally disable the clock.
Here are my suggestions:
1) Use the solution from Patch V6 but with an explaining comment that touchscreen is optional
if (!lradc->touchscreen_wire)
return 0;2) Return a special error from touchscreen registration so mfd knowns this result is expected.
I'm open for better solutions.
@Lee: What's your opinion?
Quoted 9 lines
Quoted 3 lines
I am not Lee, but given that this module already parses touchscreen properties and knows whether there is touchscreen or not, #1 seems simple and logical.
Sorry for the delay, I'm currently behind on my mail due to vacation and conferences.
+1
could you please submit a V15? It would be great to get this into 4.12.
Thanks
Stefan
PATCH v14 2/5 iio: adc: mxs-lradc: Add support for adc driver
In reply to Ksenija StanojevicAdd support for sixteen-channel 12-bit resolution ADC and its functions, which include general-purpose ADC readings, battery voltage measurement, and die temperature measurement.
---
Changes in v14:
- fix checkpatch warnings
Changes in v13:
- none
Changes in v12:
- none
Changes in v11:
- use dev_get_drvdata instead dev_get_platdata
- use writel instead mxs_lradc_reg_* functions
Changes in v10:
- none
Changes in v9:
- none
Changes in v8:
- rebase onto 4.9-rc1
Changes in v7:
- none
Changes in v6:
- update copyright
Changes in v5:
- add field void __iomem *base to struct mxs_lradc_adc
- change arguments in all functions for accessing I/O memory to follow the previous change.
- use devm_ioremap for mapping I/O memory
Changes in v4:
- update copyright
- use platform_get_irq_byname
- use irq_of_parse_and_map
Changes in v3:
- make buffer large enough for timestamps
- remove unnecessary blank lines
Changes in v2:
- improve commit message
- do not change spacing in Kconfig
- impove formating
- remove wrapper show_scale_avail
- use correct syntax for comments
- use devm_iio_trigger_alloc
- do not allocate buffer dynamically
- use iio_device_claim_*_mode helpers
- add spinlock in struct mxs_lradc_ts to enable locking in interrupt handler
- only grab irqs that are relevant to adc
- remove blank line at the end of the file
- change licence to GPL
- add copyright
drivers/iio/adc/Kconfig | 13 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/mxs-lradc-adc.c | 843 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 857 insertions(+) create mode 100644 drivers/iio/adc/mxs-lradc-adc.c
drivers/iio/adc/Kconfig +13 -0
@@ -229,6 +229,19 @@ config EXYNOS_ADC To compile this driver as a module, choose M here: the module will be called exynos_adc. +config MXS_LRADC_ADC + tristate "Freescale i.MX23/i.MX28 LRADC ADC" + depends on MFD_MXS_LRADC + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER + help + Say yes here to build support for the ADC functions of the + i.MX23/i.MX28 LRADC. This includes general-purpose ADC readings, + battery voltage measurement, and die temperature measurement. + + This driver can also be built as a module. If so, the module will be + called mxs-lradc-adc. + config FSL_MX25_ADC tristate "Freescale MX25 ADC driver" depends on MFD_MX25_TSADC
drivers/iio/adc/Makefile +1 -0
@@ -39,6 +39,7 @@ obj-$(CONFIG_MCP3422) += mcp3422.o obj-$(CONFIG_MEDIATEK_MT6577_AUXADC) += mt6577_auxadc.o obj-$(CONFIG_MEN_Z188_ADC) += men_z188_adc.o obj-$(CONFIG_MESON_SARADC) += meson_saradc.o +obj-$(CONFIG_MXS_LRADC_ADC) += mxs-lradc-adc.o obj-$(CONFIG_MXS_LRADC) += mxs-lradc.o obj-$(CONFIG_NAU7802) += nau7802.o obj-$(CONFIG_PALMAS_GPADC) += palmas_gpadc.o
drivers/iio/adc/mxs-lradc-adc.c new file +843 -0
843 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v14 3/5 input: touchscreen: mxs-lradc: Add support for touchscreen
In reply to Ksenija StanojevicAdd 4-wire/5-wire touchscreen controller.
---
Changes in v14:
- none
Changes in v13:
- use struct state_info instead of using functions for doing conditionals on every operation.
- call mxs_lradc_ts_stop() before requesting interrupts.
Changes in v12:
- none
Changes in v11:
- use dev_get_drvdata instead dev_get_platdata
- use writel instead mxs_lradc_reg_* functions
Changes in v10:
- none
Changes in v9:
- none
Changes in v8:
- rebase onto 4.9-rc1
Changes in v7:
- remove touch_ret variable in probe and use ret instead
- make error check on of_property_read_u32 in probe
Changes in v6:
- update copyright
Changes in v5:
- add field void __iomem *base to struct mxs_lradc_adc
- change arguments in all functions for accessing I/O memory to follow the previous change.
- use devm_ioremap for mapping I/O memory
Changes in v4:
- update copyright
- use platform_get_irq_byname
- use irq_of_parse_and_map
Changes in v3:
- make buffer large enough for timestamps
- remove unnecessary blank lines
Changes in v2:
- improve commit message
- do not change spacing in Kconfig
- impove formating
- remove wrapper show_scale_avail
- use correct syntax for comments
- use devm_iio_trigger_alloc
- do not allocate buffer dynamically
- use iio_device_claim_*_mode helpers
- add spinlock in struct mxs_lradc_ts to enable locking in interrupt handler
- only grab irqs that are relevant to adc
- remove blank line at the end of the file
- change licence to GPL
- add copyright
drivers/input/touchscreen/Kconfig | 10 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/mxs-lradc-ts.c | 718 +++++++++++++++++++++++++++++++ 3 files changed, 729 insertions(+) create mode 100644 drivers/input/touchscreen/mxs-lradc-ts.c
drivers/input/touchscreen/Kconfig +10 -0
@@ -841,6 +841,16 @@ config TOUCHSCREEN_USB_COMPOSITE To compile this driver as a module, choose M here: the module will be called usbtouchscreen. +config TOUCHSCREEN_MXS_LRADC + tristate "Freescale i.MX23/i.MX28 LRADC touchscreen" + depends on MFD_MXS_LRADC + help + Say Y here if you have a touchscreen connected to the low-resolution + analog-to-digital converter (LRADC) on an i.MX23 or i.MX28 processor. + + To compile this driver as a module, choose M here: the module will be + called mxs-lradc-ts. + config TOUCHSCREEN_MX25 tristate "Freescale i.MX25 touchscreen input driver" depends on MFD_MX25_TSADC
drivers/input/touchscreen/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_TOUCHSCREEN_INTEL_MID) += intel-mid-touch.o obj-$(CONFIG_TOUCHSCREEN_IPROC) += bcm_iproc_tsc.o obj-$(CONFIG_TOUCHSCREEN_LPC32XX) += lpc32xx_ts.o obj-$(CONFIG_TOUCHSCREEN_MAX11801) += max11801_ts.o +obj-$(CONFIG_TOUCHSCREEN_MXS_LRADC) += mxs-lradc-ts.o obj-$(CONFIG_TOUCHSCREEN_MX25) += fsl-imx25-tcq.o obj-$(CONFIG_TOUCHSCREEN_MC13783) += mc13783_ts.o obj-$(CONFIG_TOUCHSCREEN_MCS5000) += mcs5000_ts.o
drivers/input/touchscreen/mxs-lradc-ts.c new file +718 -0
718 lines not on this page · raw message
Signature · 1 line
1.9.1
Re: [PATCH v14 3/5] input: touchscreen: mxs-lradc: Add support for touchscreen
Hi Ksenija,
Quoted 7 lines · Ksenija Stanojevic
drivers/input/touchscreen/mxs-lradc-ts.c new file +7
-0+static int mxs_lradc_ts_register (struct mxs_lradc_ts *ts) +{ +struct input_dev *input = ts->ts_input; +struct device *dev = ts->dev; + + input =devm_input_allocate_device (dev); +if (!input)
drivers/input/touchscreen/mxs-lradc-ts.c line 601
Quoted 10 lines
drivers/input/touchscreen/mxs-lradc-ts.c new file +10
-0+return -ENOMEM ; + + input->name ="mxs-lradc-ts" ; + input->id.bustype =BUS_HOST ; + input->open = mxs_lradc_ts_open; + input->close = mxs_lradc_ts_close; + +__set_bit (EV_ABS , input->evbit); +__set_bit (EV_KEY , input->evbit); +__set_bit (BTN_TOUCH , input->keybit);
If you end up re-spinnig the series, please drop __set_bit()s above and replace with
input_set_capability(input, EV_KEY, BTN_TOUCH);
because input_set_abs_params() already sets EV_ABS for you.
If you will not re-spin, you can leave it as is.
In any case:
drivers/input/touchscreen/mxs-lradc-ts.c line 612
Quoted 11 lines
drivers/input/touchscreen/mxs-lradc-ts.c new file +11
-0+__set_bit (INPUT_PROP_DIRECT , input->propbit); +input_set_abs_params (input,ABS_X ,0 ,LRADC_SINGLE_SAMPLE_MASK ,0 ,0 ); +input_set_abs_params (input,ABS_Y ,0 ,LRADC_SINGLE_SAMPLE_MASK ,0 ,0 ); +input_set_abs_params (input,ABS_PRESSURE ,0 ,LRADC_SINGLE_SAMPLE_MASK , +0 ,0 ); + + ts->ts_input = input; +input_set_drvdata (input, ts); + +return input_register_device (input); +}
Thanks.
Signature · 1 line
Dmitry
Re: [PATCH v14 3/5] input: touchscreen: mxs-lradc: Add support for touchscreen
In reply to Ksenija StanojevicHi Ksenija!
Quoted 110 lines · Ksenija Stanojevic
drivers/input/touchscreen/mxs-lradc-ts.c new file +110
-0+static int mxs_lradc_ts_register (struct mxs_lradc_ts *ts) +{ +struct input_dev *input = ts->ts_input; +struct device *dev = ts->dev; + + input =devm_input_allocate_device (dev); +if (!input) +return -ENOMEM ; + + input->name ="mxs-lradc-ts" ; + input->id.bustype =BUS_HOST ; + input->open = mxs_lradc_ts_open; + input->close = mxs_lradc_ts_close; + +__set_bit (EV_ABS , input->evbit); +__set_bit (EV_KEY , input->evbit); +__set_bit (BTN_TOUCH , input->keybit); +__set_bit (INPUT_PROP_DIRECT , input->propbit); +input_set_abs_params (input,ABS_X ,0 ,LRADC_SINGLE_SAMPLE_MASK ,0 ,0 ); +input_set_abs_params (input,ABS_Y ,0 ,LRADC_SINGLE_SAMPLE_MASK ,0 ,0 ); +input_set_abs_params (input,ABS_PRESSURE ,0 ,LRADC_SINGLE_SAMPLE_MASK , +0 ,0 ); + + ts->ts_input = input; +input_set_drvdata (input, ts); + +return input_register_device (input); +} + +static int mxs_lradc_ts_probe (struct platform_device *pdev) +{ +struct device *dev = &pdev->dev; +struct device_node *node = dev->parent->of_node; +struct mxs_lradc *lradc =dev_get_drvdata (dev->parent); +struct mxs_lradc_ts *ts; +struct resource *iores; +int ret, irq, virq, i; +u32 ts_wires =0 , adapt; + + ts =devm_kzalloc (dev,sizeof (*ts),GFP_KERNEL ); +if (!ts) +return -ENOMEM ; + +platform_set_drvdata (pdev, ts); + + ts->lradc = lradc; + ts->dev = dev; +spin_lock_init (&ts->lock); + + iores =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); + ts->base =devm_ioremap (dev, iores->start,resource_size (iores)); +if (IS_ERR (ts->base)) +return PTR_ERR (ts->base); + + ret =of_property_read_u32 (node,"fsl,lradc-touchscreen-wires" , + &ts_wires); +if (ret) +return ret; + +if (of_property_read_u32 (node,"fsl,ave-ctrl" , &adapt)) { + ts->over_sample_cnt =4 ; + }else { +if (adapt >=1 || adapt <=32 ) { + ts->over_sample_cnt = adapt; + }else { +dev_err (ts->dev,"Invalid sample count (%u)\n" , + adapt); +return -EINVAL ; + } + } + +if (of_property_read_u32 (node,"fsl,ave-delay" , &adapt)) { + ts->over_sample_delay =2 ; + }else { +if (adapt >=2 || adapt <=LRADC_DELAY_DELAY_MASK +1 ) { + ts->over_sample_delay = adapt; + }else { +dev_err (ts->dev,"Invalid sample delay (%u)\n" , + adapt); +return -EINVAL ; + } + } + +if (of_property_read_u32 (node,"fsl,settling" , &adapt)) { + ts->settling_delay =10 ; + }else { +if (adapt >=1 || adapt <=LRADC_DELAY_DELAY_MASK ) { + ts->settling_delay = adapt; + }else { +dev_err (ts->dev,"Invalid settling delay (%u)\n" , + adapt); +return -EINVAL ; + } + } + + ret =stmp_reset_block (ts->base); +if (ret) +return ret; + +mxs_lradc_ts_hw_init (ts); + +for (i =0 ; i <3 ; i++) { + irq =platform_get_irq_byname (pdev, mxs_lradc_ts_irq_names[i]); +if (irq <0 ) +return irq; + + virq =irq_of_parse_and_map (node, irq); + +mxs_lradc_ts_stop (ts); +
drivers/input/touchscreen/mxs-lradc-ts.c line 704
Quoted 10 lines
drivers/input/touchscreen/mxs-lradc-ts.c new file +10
-0+ ret =devm_request_irq (dev, virq, + mxs_lradc_ts_handle_irq, +0 , mxs_lradc_ts_irq_names[i], ts); +if (ret) +return ret; + } + +mxs_lradc_ts_register (ts); + +return 0 ;
In case you end up creating v15, please check if the above can be:
return mxs_lradc_ts_register(ts);
Offtopic: This patch series has got the most contradictory review comments I have seen so far at kernel work. Thanks for your tireless effort to satisfy everybody. I'm looking forward to this getting merged.
Harald
Signature · 4 lines
If you want to support my work: see http://friends.ccbib.org/harald/supporting/ or donate via CLAM to xASPBtezLNqj4cUe8MT5nZjthRSEjrRQXN or via peercoin to P98LRdhit3gZbHDBe7ta5jtXrMJUms4p7w
Jonathan Cameron
maintainerRe: [PATCH v14 3/5] input: touchscreen: mxs-lradc: Add support for touchscreen
Quoted 127 lines · Harald Geyer
Hi Ksenija!
Quoted 110 lines · Ksenija Stanojevic
drivers/input/touchscreen/mxs-lradc-ts.c new file +110
-0+static int mxs_lradc_ts_register (struct mxs_lradc_ts *ts) +{ +struct input_dev *input = ts->ts_input; +struct device *dev = ts->dev; + + input =devm_input_allocate_device (dev); +if (!input) +return -ENOMEM ; + + input->name ="mxs-lradc-ts" ; + input->id.bustype =BUS_HOST ; + input->open = mxs_lradc_ts_open; + input->close = mxs_lradc_ts_close; + +__set_bit (EV_ABS , input->evbit); +__set_bit (EV_KEY , input->evbit); +__set_bit (BTN_TOUCH , input->keybit); +__set_bit (INPUT_PROP_DIRECT , input->propbit); +input_set_abs_params (input,ABS_X ,0 ,LRADC_SINGLE_SAMPLE_MASK ,0 ,0 ); +input_set_abs_params (input,ABS_Y ,0 ,LRADC_SINGLE_SAMPLE_MASK ,0 ,0 ); +input_set_abs_params (input,ABS_PRESSURE ,0 ,LRADC_SINGLE_SAMPLE_MASK , +0 ,0 ); + + ts->ts_input = input; +input_set_drvdata (input, ts); + +return input_register_device (input); +} + +static int mxs_lradc_ts_probe (struct platform_device *pdev) +{ +struct device *dev = &pdev->dev; +struct device_node *node = dev->parent->of_node; +struct mxs_lradc *lradc =dev_get_drvdata (dev->parent); +struct mxs_lradc_ts *ts; +struct resource *iores; +int ret, irq, virq, i; +u32 ts_wires =0 , adapt; + + ts =devm_kzalloc (dev,sizeof (*ts),GFP_KERNEL ); +if (!ts) +return -ENOMEM ; + +platform_set_drvdata (pdev, ts); + + ts->lradc = lradc; + ts->dev = dev; +spin_lock_init (&ts->lock); + + iores =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); + ts->base =devm_ioremap (dev, iores->start,resource_size (iores)); +if (IS_ERR (ts->base)) +return PTR_ERR (ts->base); + + ret =of_property_read_u32 (node,"fsl,lradc-touchscreen-wires" , + &ts_wires); +if (ret) +return ret; + +if (of_property_read_u32 (node,"fsl,ave-ctrl" , &adapt)) { + ts->over_sample_cnt =4 ; + }else { +if (adapt >=1 || adapt <=32 ) { + ts->over_sample_cnt = adapt; + }else { +dev_err (ts->dev,"Invalid sample count (%u)\n" , + adapt); +return -EINVAL ; + } + } + +if (of_property_read_u32 (node,"fsl,ave-delay" , &adapt)) { + ts->over_sample_delay =2 ; + }else { +if (adapt >=2 || adapt <=LRADC_DELAY_DELAY_MASK +1 ) { + ts->over_sample_delay = adapt; + }else { +dev_err (ts->dev,"Invalid sample delay (%u)\n" , + adapt); +return -EINVAL ; + } + } + +if (of_property_read_u32 (node,"fsl,settling" , &adapt)) { + ts->settling_delay =10 ; + }else { +if (adapt >=1 || adapt <=LRADC_DELAY_DELAY_MASK ) { + ts->settling_delay = adapt; + }else { +dev_err (ts->dev,"Invalid settling delay (%u)\n" , + adapt); +return -EINVAL ; + } + } + + ret =stmp_reset_block (ts->base); +if (ret) +return ret; + +mxs_lradc_ts_hw_init (ts); + +for (i =0 ; i <3 ; i++) { + irq =platform_get_irq_byname (pdev, mxs_lradc_ts_irq_names[i]); +if (irq <0 ) +return irq; + + virq =irq_of_parse_and_map (node, irq); + +mxs_lradc_ts_stop (ts); +drivers/input/touchscreen/mxs-lradc-ts.c line 704
Quoted 10 lines
drivers/input/touchscreen/mxs-lradc-ts.c new file +10
-0+ ret =devm_request_irq (dev, virq, + mxs_lradc_ts_handle_irq, +0 , mxs_lradc_ts_irq_names[i], ts); +if (ret) +return ret; + } + +mxs_lradc_ts_register (ts); + +return 0 ;In case you end up creating v15, please check if the above can be:
returnmxs_lradc_ts_register(ts);
Quoted 6 lines
Offtopic: This patch series has got the most contradictory review comments I have seen so far at kernel work. Thanks for your tireless effort to satisfy everybody. I'm looking forward to this getting merged.
Harald
Seconded! It's been one of those 'interesting' series but hopefully we are getting to a conclusion.
Jonathan
PATCH v14 4/5 iio: adc: mxs-lradc: Remove driver
In reply to Ksenija StanojevicSince the driver has been split into mfd there is no reason for it to stay, so remove it.
---
Changes in v14:
- none
Changes in v13:
- none
Changes in v12:
- none
Changes in v11:
- none
Changes in v10:
- none
Changes in v9:
- none
Changes in v8:
- rebase onto 4.9-rc1
Changes in v7:
- none
Changes in v6:
- none
Changes in v5:
- none
Changes in v4:
- none
Changes in v3:
- none
Changes in v2:
- add to the patchset
drivers/iio/adc/Kconfig | 14 - drivers/iio/adc/Makefile | 1 - drivers/iio/adc/mxs-lradc.c | 1750 ------------------------------------------- 3 files changed, 1765 deletions(-) delete mode 100644 drivers/iio/adc/mxs-lradc.c
drivers/iio/adc/Kconfig +0 -14
@@ -424,20 +424,6 @@ config MESON_SARADC To compile this driver as a module, choose M here: the module will be called meson_saradc. -config MXS_LRADC - tristate "Freescale i.MX23/i.MX28 LRADC" - depends on (ARCH_MXS || COMPILE_TEST) && HAS_IOMEM - depends on INPUT - select STMP_DEVICE - select IIO_BUFFER - select IIO_TRIGGERED_BUFFER - help - Say yes here to build support for i.MX23/i.MX28 LRADC convertor - built into these chips. - - To compile this driver as a module, choose M here: the - module will be called mxs-lradc. - config NAU7802 tristate "Nuvoton NAU7802 ADC driver" depends on I2C
drivers/iio/adc/Makefile +0 -1
@@ -40,7 +40,6 @@ obj-$(CONFIG_MEDIATEK_MT6577_AUXADC) += mt6577_auxadc.o obj-$(CONFIG_MEN_Z188_ADC) += men_z188_adc.o obj-$(CONFIG_MESON_SARADC) += meson_saradc.o obj-$(CONFIG_MXS_LRADC_ADC) += mxs-lradc-adc.o -obj-$(CONFIG_MXS_LRADC) += mxs-lradc.o obj-$(CONFIG_NAU7802) += nau7802.o obj-$(CONFIG_PALMAS_GPADC) += palmas_gpadc.o obj-$(CONFIG_QCOM_SPMI_IADC) += qcom-spmi-iadc.o
drivers/iio/adc/mxs-lradc.c deleted +0 -1750
1,750 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v14 5/5 mfd: Move binding document
In reply to Ksenija StanojevicThe bindings, which are now used in MFD, need also to be documented in the MFD binding document.
---
Changes in v14:
- none
Changes in v13:
- none
Changes in v12:
- none
Changes in v11:
- none
Changes in v10:
- none
Changes in v9:
- format patch using -M option
Changes in v8:
- rebase onto 4.9-rc1
Changes in v7:
- add to the patchset
Documentation/devicetree/bindings/{iio/adc => mfd}/mxs-lradc.txt | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename Documentation/devicetree/bindings/{iio/adc => mfd}/mxs-lradc.txt (100%)Documentation/devicetree/bindings/mfd/mxs-lradc.txt renamed from Documentation/devicetree/bindings/iio/adc/mxs-lradc.txt +0 -0
Signature · 1 line
1.9.1