Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-23 Thread Jonathan Cameron
On 21/07/16 14:15, Quentin Schulz wrote: > On 20/07/2016 16:57, Jonathan Cameron wrote: >> On 19/07/16 09:33, Quentin Schulz wrote: >>> On 18/07/2016 15:18, Jonathan Cameron wrote: On 15/07/16 10:59, Quentin Schulz wrote: > [...] > + enable_irq(info->temp_data_irq); Is this hardware

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-23 Thread Jonathan Cameron
On 21/07/16 14:15, Quentin Schulz wrote: > On 20/07/2016 16:57, Jonathan Cameron wrote: >> On 19/07/16 09:33, Quentin Schulz wrote: >>> On 18/07/2016 15:18, Jonathan Cameron wrote: On 15/07/16 10:59, Quentin Schulz wrote: > [...] > + enable_irq(info->temp_data_irq); Is this hardware

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-21 Thread Quentin Schulz
On 20/07/2016 16:57, Jonathan Cameron wrote: > On 19/07/16 09:33, Quentin Schulz wrote: >> On 18/07/2016 15:18, Jonathan Cameron wrote: >>> On 15/07/16 10:59, Quentin Schulz wrote: [...] + enable_irq(info->temp_data_irq); >>> Is this hardware spitting out extra irqs? If not, much better to

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-21 Thread Quentin Schulz
On 20/07/2016 16:57, Jonathan Cameron wrote: > On 19/07/16 09:33, Quentin Schulz wrote: >> On 18/07/2016 15:18, Jonathan Cameron wrote: >>> On 15/07/16 10:59, Quentin Schulz wrote: [...] + enable_irq(info->temp_data_irq); >>> Is this hardware spitting out extra irqs? If not, much better to

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-20 Thread Jonathan Cameron
On 20/07/16 13:37, Quentin Schulz wrote: > On 18/07/2016 15:18, Jonathan Cameron wrote: > [...] >>> + >>> + if (!wait_for_completion_timeout(>completion, >>> +msecs_to_jiffies(100))) { >>> + ret = -ETIMEDOUT; >>> + goto out; >>> + } >>> +

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-20 Thread Jonathan Cameron
On 20/07/16 13:37, Quentin Schulz wrote: > On 18/07/2016 15:18, Jonathan Cameron wrote: > [...] >>> + >>> + if (!wait_for_completion_timeout(>completion, >>> +msecs_to_jiffies(100))) { >>> + ret = -ETIMEDOUT; >>> + goto out; >>> + } >>> +

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-20 Thread Jonathan Cameron
On 19/07/16 09:33, Quentin Schulz wrote: > On 18/07/2016 15:18, Jonathan Cameron wrote: >> On 15/07/16 10:59, Quentin Schulz wrote: >>> The Allwinner SoCs all have an ADC that can also act as a touchscreen >>> controller and a thermal sensor. This patch adds the ADC driver which is >>> based on

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-20 Thread Jonathan Cameron
On 19/07/16 09:33, Quentin Schulz wrote: > On 18/07/2016 15:18, Jonathan Cameron wrote: >> On 15/07/16 10:59, Quentin Schulz wrote: >>> The Allwinner SoCs all have an ADC that can also act as a touchscreen >>> controller and a thermal sensor. This patch adds the ADC driver which is >>> based on

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-20 Thread Crt Mori
On 20 July 2016 at 14:37, Quentin Schulz wrote: > On 18/07/2016 15:18, Jonathan Cameron wrote: > [...] >>> + >>> +if (!wait_for_completion_timeout(>completion, >>> + msecs_to_jiffies(100))) { >>> +ret =

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-20 Thread Crt Mori
On 20 July 2016 at 14:37, Quentin Schulz wrote: > On 18/07/2016 15:18, Jonathan Cameron wrote: > [...] >>> + >>> +if (!wait_for_completion_timeout(>completion, >>> + msecs_to_jiffies(100))) { >>> +ret = -ETIMEDOUT; >>> +goto out; >>>

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-20 Thread Quentin Schulz
On 18/07/2016 15:18, Jonathan Cameron wrote: [...] >> + >> +if (!wait_for_completion_timeout(>completion, >> + msecs_to_jiffies(100))) { >> +ret = -ETIMEDOUT; >> +goto out; >> +} >> + >> +if (info->flags &

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-20 Thread Quentin Schulz
On 18/07/2016 15:18, Jonathan Cameron wrote: [...] >> + >> +if (!wait_for_completion_timeout(>completion, >> + msecs_to_jiffies(100))) { >> +ret = -ETIMEDOUT; >> +goto out; >> +} >> + >> +if (info->flags &

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-19 Thread Maxime Ripard
On Tue, Jul 19, 2016 at 11:04:23AM +0200, Quentin Schulz wrote: > >> +/* TP_CTRL1 bits */ > >> +#define SUNXI_GPADC_STYLUS_UP_DEBOUNCE(x) ((x) << 12) /* 8 bits */ > >> +#define SUNXI_GPADC_STYLUS_UP_DEBOUNCE_EN BIT(9) > >> +#define SUNXI_GPADC_TOUCH_PAN_CALI_EN BIT(6) > >> +#define

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-19 Thread Maxime Ripard
On Tue, Jul 19, 2016 at 11:04:23AM +0200, Quentin Schulz wrote: > >> +/* TP_CTRL1 bits */ > >> +#define SUNXI_GPADC_STYLUS_UP_DEBOUNCE(x) ((x) << 12) /* 8 bits */ > >> +#define SUNXI_GPADC_STYLUS_UP_DEBOUNCE_EN BIT(9) > >> +#define SUNXI_GPADC_TOUCH_PAN_CALI_EN BIT(6) > >> +#define

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-19 Thread Quentin Schulz
On 18/07/2016 14:57, Maxime Ripard wrote: > On Fri, Jul 15, 2016 at 11:59:12AM +0200, Quentin Schulz wrote: >> The Allwinner SoCs all have an ADC that can also act as a touchscreen >> controller and a thermal sensor. This patch adds the ADC driver which is >> based on the MFD for the same SoCs

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-19 Thread Quentin Schulz
On 18/07/2016 14:57, Maxime Ripard wrote: > On Fri, Jul 15, 2016 at 11:59:12AM +0200, Quentin Schulz wrote: >> The Allwinner SoCs all have an ADC that can also act as a touchscreen >> controller and a thermal sensor. This patch adds the ADC driver which is >> based on the MFD for the same SoCs

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-19 Thread Quentin Schulz
On 18/07/2016 15:18, Jonathan Cameron wrote: > On 15/07/16 10:59, Quentin Schulz wrote: >> The Allwinner SoCs all have an ADC that can also act as a touchscreen >> controller and a thermal sensor. This patch adds the ADC driver which is >> based on the MFD for the same SoCs ADC. >> >> This also

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-19 Thread Quentin Schulz
On 18/07/2016 15:18, Jonathan Cameron wrote: > On 15/07/16 10:59, Quentin Schulz wrote: >> The Allwinner SoCs all have an ADC that can also act as a touchscreen >> controller and a thermal sensor. This patch adds the ADC driver which is >> based on the MFD for the same SoCs ADC. >> >> This also

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-18 Thread Jonathan Cameron
On 15/07/16 10:59, Quentin Schulz wrote: > The Allwinner SoCs all have an ADC that can also act as a touchscreen > controller and a thermal sensor. This patch adds the ADC driver which is > based on the MFD for the same SoCs ADC. > > This also registers the thermal adc channel in the iio map

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-18 Thread Jonathan Cameron
On 15/07/16 10:59, Quentin Schulz wrote: > The Allwinner SoCs all have an ADC that can also act as a touchscreen > controller and a thermal sensor. This patch adds the ADC driver which is > based on the MFD for the same SoCs ADC. > > This also registers the thermal adc channel in the iio map

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-18 Thread Maxime Ripard
On Fri, Jul 15, 2016 at 11:59:12AM +0200, Quentin Schulz wrote: > The Allwinner SoCs all have an ADC that can also act as a touchscreen > controller and a thermal sensor. This patch adds the ADC driver which is > based on the MFD for the same SoCs ADC. > > This also registers the thermal adc

Re: [PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-18 Thread Maxime Ripard
On Fri, Jul 15, 2016 at 11:59:12AM +0200, Quentin Schulz wrote: > The Allwinner SoCs all have an ADC that can also act as a touchscreen > controller and a thermal sensor. This patch adds the ADC driver which is > based on the MFD for the same SoCs ADC. > > This also registers the thermal adc

[PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-15 Thread Quentin Schulz
The Allwinner SoCs all have an ADC that can also act as a touchscreen controller and a thermal sensor. This patch adds the ADC driver which is based on the MFD for the same SoCs ADC. This also registers the thermal adc channel in the iio map array so iio_hwmon could use it without modifying the

[PATCH v2 2/4] iio: adc: add support for Allwinner SoCs ADC

2016-07-15 Thread Quentin Schulz
The Allwinner SoCs all have an ADC that can also act as a touchscreen controller and a thermal sensor. This patch adds the ADC driver which is based on the MFD for the same SoCs ADC. This also registers the thermal adc channel in the iio map array so iio_hwmon could use it without modifying the