All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@bootlin.com>
To: Philipp Rossak <embed3d@gmail.com>
Cc: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com,
	wens@csie.org, linux@armlinux.org.uk, jic23@kernel.org,
	knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
	eugen.hristev@microchip.com, rdunlap@infradead.org,
	vilhelm.gray@gmail.com, clabbe.montjoie@gmail.com,
	quentin.schulz@bootlin.com, geert+renesas@glider.be,
	lukas@wunner.de, icenowy@aosc.io, arnd@arndb.de,
	broonie@kernel.org, arnaud.pouliquen@st.com,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com
Subject: Re: [PATCH v3 10/30] iio: adc: rework irq and adc_channel handling
Date: Fri, 31 Aug 2018 10:44:37 +0200	[thread overview]
Message-ID: <20180831084437.mxcwf4wbrxbpoa5e@flea> (raw)
In-Reply-To: <20180830154518.29507-11-embed3d@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 12941 bytes --]

Hi,

On Thu, Aug 30, 2018 at 05:44:58PM +0200, Philipp Rossak wrote:
> We rework the irq handling and the adc_channel handling.
> This is requiered since we merge the mfd driver into the adc driver.
> 
> Signed-off-by: Philipp Rossak <embed3d@gmail.com>

This patch is actually the opposite of the previous ones, it has too
many things in it, and sohuld be split :)

> ---
>  drivers/iio/adc/sun4i-gpadc-iio.c | 157 ++++++++++++++++++++++++--------------
>  include/linux/mfd/sun4i-gpadc.h   |   7 --
>  2 files changed, 98 insertions(+), 66 deletions(-)
> 
> diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
> index 658a7e3e3370..a2027614ee0c 100644
> --- a/drivers/iio/adc/sun4i-gpadc-iio.c
> +++ b/drivers/iio/adc/sun4i-gpadc-iio.c
> @@ -49,6 +49,8 @@ static unsigned int sun6i_gpadc_chan_select(unsigned int chan)
>  	return SUN6I_GPADC_CTRL1_ADC_CHAN_SELECT(chan);
>  }
>  
> +struct sun4i_gpadc_iio;
> +
>  struct gpadc_data {
>  	int		temp_offset;
>  	int		temp_scale;
> @@ -56,8 +58,15 @@ struct gpadc_data {
>  	unsigned int	tp_adc_select;
>  	unsigned int	(*adc_chan_select)(unsigned int chan);
>  	unsigned int	adc_chan_mask;
> +	bool		adc_channel;
> +	irqreturn_t	(*ths_irq_thread)(int irq, void *dev_id);
> +	int		(*ths_suspend)(struct sun4i_gpadc_iio *info);
> +	int		(*ths_resume)(struct sun4i_gpadc_iio *info);
> +	bool		support_irq;
>  };
>  
> +static irqreturn_t sun4i_gpadc_data_irq_handler(int irq, void *dev_id);
> +
>  static const struct gpadc_data sun4i_gpadc_data = {
>  	.temp_offset = -1932,
>  	.temp_scale = 133,
> @@ -65,6 +74,9 @@ static const struct gpadc_data sun4i_gpadc_data = {
>  	.tp_adc_select = SUN4I_GPADC_CTRL1_TP_ADC_SELECT,
>  	.adc_chan_select = &sun4i_gpadc_chan_select,
>  	.adc_chan_mask = SUN4I_GPADC_CTRL1_ADC_CHAN_MASK,
> +	.adc_channel = true,
> +	.ths_irq_thread = sun4i_gpadc_data_irq_handler,
> +	.support_irq = true,
>  };
>  
>  static const struct gpadc_data sun5i_gpadc_data = {
> @@ -74,6 +86,9 @@ static const struct gpadc_data sun5i_gpadc_data = {
>  	.tp_adc_select = SUN4I_GPADC_CTRL1_TP_ADC_SELECT,
>  	.adc_chan_select = &sun4i_gpadc_chan_select,
>  	.adc_chan_mask = SUN4I_GPADC_CTRL1_ADC_CHAN_MASK,
> +	.adc_channel = true,
> +	.ths_irq_thread = sun4i_gpadc_data_irq_handler,
> +	.support_irq = true,
>  };
>  
>  static const struct gpadc_data sun6i_gpadc_data = {
> @@ -83,6 +98,9 @@ static const struct gpadc_data sun6i_gpadc_data = {
>  	.tp_adc_select = SUN6I_GPADC_CTRL1_TP_ADC_SELECT,
>  	.adc_chan_select = &sun6i_gpadc_chan_select,
>  	.adc_chan_mask = SUN6I_GPADC_CTRL1_ADC_CHAN_MASK,
> +	.adc_channel = true,
> +	.ths_irq_thread = sun4i_gpadc_data_irq_handler,
> +	.support_irq = true,

So this seems to enable the support for the interrupts without going
through the MFD regmap that was removed in the previous patches.

>  };
>  
>  static const struct gpadc_data sun8i_a33_gpadc_data = {
> @@ -96,13 +114,10 @@ struct sun4i_gpadc_iio {
>  	struct completion		completion;
>  	int				temp_data;
>  	u32				adc_data;
> +	unsigned int			irq_data_type;
>  	struct regmap			*regmap;
> -	unsigned int			fifo_data_irq;
> -	atomic_t			ignore_fifo_data_irq;
> -	unsigned int			temp_data_irq;
> -	atomic_t			ignore_temp_data_irq;
> +	unsigned int			irq;
>  	const struct gpadc_data		*data;
> -	bool				no_irq;

But at the same time, you remove some fields of that structure, and
rename some other without any explanation.

>  	/* prevents concurrent reads of temperature and ADC */
>  	struct mutex			mutex;
>  	struct thermal_zone_device	*tzd;
> @@ -130,6 +145,20 @@ static const struct regmap_config sun4i_gpadc_regmap_config = {
>  	.fast_io = true,
>  };
>  
> +static int sun4i_gpadc_irq_init(struct sun4i_gpadc_iio *info)
> +{
> +	u32 reg;
> +
> +	if (info->irq_data_type == SUN4I_GPADC_IRQ_FIFO_DATA)
> +		reg = SUN4I_GPADC_INT_FIFOC_TEMP_IRQ_EN;
> +	else
> +		reg = SUN4I_GPADC_INT_FIFOC_TEMP_IRQ_EN;
> +
> +	regmap_write(info->regmap, SUN4I_GPADC_INT_FIFOC, reg);
> +
> +	return 0;
> +}
> +
>  static int sun4i_prepare_for_irq(struct iio_dev *indio_dev, int channel,
>  				 unsigned int irq)
>  {
> @@ -151,7 +180,7 @@ static int sun4i_prepare_for_irq(struct iio_dev *indio_dev, int channel,
>  	if (ret)
>  		return ret;
>  
> -	if (irq == info->fifo_data_irq) {
> +	if (irq == SUN4I_GPADC_IRQ_FIFO_DATA) {
>  		ret = regmap_write(info->regmap, SUN4I_GPADC_CTRL1,
>  				   info->data->tp_mode_en |
>  				   info->data->tp_adc_select |
> @@ -172,6 +201,8 @@ static int sun4i_prepare_for_irq(struct iio_dev *indio_dev, int channel,
>  		ret = regmap_write(info->regmap, SUN4I_GPADC_CTRL1,
>  				   info->data->tp_mode_en);
>  	}
> +	if (info->data->support_irq)
> +		sun4i_gpadc_irq_init(info);
>  
>  	if (ret)
>  		return ret;
> @@ -194,11 +225,12 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
>  
>  	mutex_lock(&info->mutex);
>  
> +	info->irq_data_type = irq;

This would need to be explained too

>  	ret = sun4i_prepare_for_irq(indio_dev, channel, irq);
>  	if (ret)
>  		goto err;
>  
> -	enable_irq(irq);
> +	enable_irq(info->irq);
>  
>  	/*
>  	 * The temperature sensor throws an interruption periodically (currently
> @@ -212,7 +244,7 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
>  		goto err;
>  	}
>  
> -	if (irq == info->fifo_data_irq)
> +	if (irq == SUN4I_GPADC_IRQ_FIFO_DATA)
>  		*val = info->adc_data;
>  	else
>  		*val = info->temp_data;
> @@ -222,7 +254,7 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
>  
>  err:
>  	pm_runtime_put_autosuspend(indio_dev->dev.parent);
> -	disable_irq(irq);
> +	disable_irq(info->irq);
>  	mutex_unlock(&info->mutex);
>  
>  	return ret;
> @@ -231,16 +263,15 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
>  static int sun4i_gpadc_adc_read(struct iio_dev *indio_dev, int channel,
>  				int *val)
>  {
> -	struct sun4i_gpadc_iio *info = iio_priv(indio_dev);
> -
> -	return sun4i_gpadc_read(indio_dev, channel, val, info->fifo_data_irq);
> +	return sun4i_gpadc_read(indio_dev, channel, val,
> +			SUN4I_GPADC_IRQ_FIFO_DATA);
>  }
>  
>  static int sun4i_gpadc_temp_read(struct iio_dev *indio_dev, int *val)
>  {
>  	struct sun4i_gpadc_iio *info = iio_priv(indio_dev);
>  
> -	if (info->no_irq) {
> +	if (!info->data->support_irq) {
>  		pm_runtime_get_sync(indio_dev->dev.parent);
>  
>  		regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA, val);
> @@ -251,7 +282,7 @@ static int sun4i_gpadc_temp_read(struct iio_dev *indio_dev, int *val)
>  		return 0;
>  	}
>  
> -	return sun4i_gpadc_read(indio_dev, 0, val, info->temp_data_irq);
> +	return sun4i_gpadc_read(indio_dev, 0, val, SUN4I_GPADC_IRQ_TEMP_DATA);
>  }
>  
>  static int sun4i_gpadc_temp_offset(struct iio_dev *indio_dev, int *val)
> @@ -320,31 +351,21 @@ static const struct iio_info sun4i_gpadc_iio_info = {
>  	.read_raw = sun4i_gpadc_read_raw,
>  };
>  
> -static irqreturn_t sun4i_gpadc_temp_data_irq_handler(int irq, void *dev_id)
> +static irqreturn_t sun4i_gpadc_data_irq_handler(int irq, void *dev_id)
>  {
>  	struct sun4i_gpadc_iio *info = dev_id;
>  
> -	if (atomic_read(&info->ignore_temp_data_irq))
> -		goto out;
> -
> -	if (!regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA, &info->temp_data))
> -		complete(&info->completion);
> -
> -out:
> -	return IRQ_HANDLED;
> -}
> -
> -static irqreturn_t sun4i_gpadc_fifo_data_irq_handler(int irq, void *dev_id)
> -{
> -	struct sun4i_gpadc_iio *info = dev_id;
> -
> -	if (atomic_read(&info->ignore_fifo_data_irq))
> -		goto out;
> -
> -	if (!regmap_read(info->regmap, SUN4I_GPADC_DATA, &info->adc_data))
> -		complete(&info->completion);
> -
> -out:
> +	if (info->irq_data_type == SUN4I_GPADC_IRQ_FIFO_DATA) {
> +		/* read fifo data */
> +		if (!regmap_read(info->regmap, SUN4I_GPADC_DATA,
> +					&info->adc_data))
> +			complete(&info->completion);
> +	} else {
> +		/* read temp data */
> +		if (!regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA,
> +					&info->temp_data))
> +			complete(&info->completion);
> +	}
>  	return IRQ_HANDLED;
>  }
>  
> @@ -356,6 +377,8 @@ static int sun4i_gpadc_runtime_suspend(struct device *dev)
>  	regmap_write(info->regmap, SUN4I_GPADC_CTRL1, 0);
>  	/* Disable temperature sensor on IP */
>  	regmap_write(info->regmap, SUN4I_GPADC_TPR, 0);
> +	/* Disable irq*/
> +	regmap_write(info->regmap, SUN4I_GPADC_INT_FIFOC, 0);
>  
>  	return 0;
>  }
> @@ -378,6 +401,7 @@ static int sun4i_gpadc_runtime_resume(struct device *dev)
>  		     SUN4I_GPADC_TPR_TEMP_ENABLE |
>  		     SUN4I_GPADC_TPR_TEMP_PERIOD(800));
>  
> +
>  	return 0;
>  }
>  
> @@ -426,8 +450,6 @@ static int sun4i_gpadc_probe_dt(struct platform_device *pdev,
>  	if (!info->data)
>  		return -ENODEV;
>  
> -	info->no_irq = true;
> -
>  	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	base = devm_ioremap_resource(&pdev->dev, mem);
>  	if (IS_ERR(base))
> @@ -441,8 +463,25 @@ static int sun4i_gpadc_probe_dt(struct platform_device *pdev,
>  		return ret;
>  	}
>  
> -	if (IS_ENABLED(CONFIG_THERMAL_OF))
> -		info->sensor_device = &pdev->dev;

You're also dropping the THERMAL_OF conditions

> +	if (info->data->support_irq) {
> +
> +		/* ths interrupt */
> +		info->irq = platform_get_irq(pdev, 0);
> +
> +		ret = devm_request_threaded_irq(&pdev->dev, info->irq,
> +				NULL, info->data->ths_irq_thread,
> +				IRQF_ONESHOT, dev_name(&pdev->dev), info);

Why do you need a threaded interrupt?

> +		if (info->data->adc_channel)
> +			disable_irq(info->irq);

Does it still needs to be disabled? Why?

> +		if (ret) {
> +			dev_err(&pdev->dev, "failed to add ths irq: %d\n", ret);
> +			return ret;
> +		}
> +	}
> +
> +	info->sensor_device = &pdev->dev;
>  
>  	return 0;
>  }
> @@ -469,6 +508,11 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
>  	indio_dev->info = &sun4i_gpadc_iio_info;
>  	indio_dev->modes = INDIO_DIRECT_MODE;
>  
> +	if (&info->data->adc_channel) {
> +		indio_dev->num_channels = ARRAY_SIZE(sun4i_gpadc_channels);
> +		indio_dev->channels = sun4i_gpadc_channels;
> +	}
> +
>  	ret = sun4i_gpadc_probe_dt(pdev, indio_dev);
>  
>  	if (ret)
> @@ -480,20 +524,18 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
>  	pm_runtime_set_suspended(&pdev->dev);
>  	pm_runtime_enable(&pdev->dev);
>  
> -	if (IS_ENABLED(CONFIG_THERMAL_OF)) {
> -		info->tzd = thermal_zone_of_sensor_register(info->sensor_device,
> -							    0, info,
> -							    &sun4i_ts_tz_ops);
> -		/*
> -		 * Do not fail driver probing when failing to register in
> -		 * thermal because no thermal DT node is found.
> -		 */
> -		if (IS_ERR(info->tzd) && PTR_ERR(info->tzd) != -ENODEV) {
> -			dev_err(&pdev->dev,
> -				"could not register thermal sensor: %ld\n",
> -				PTR_ERR(info->tzd));
> -			return PTR_ERR(info->tzd);
> -		}
> +	info->tzd = thermal_zone_of_sensor_register(info->sensor_device,
> +						    0, info,
> +						    &sun4i_ts_tz_ops);
> +	/*
> +	 * Do not fail driver probing when failing to register in
> +	 * thermal because no thermal DT node is found.
> +	 */
> +	if (IS_ERR(info->tzd) && PTR_ERR(info->tzd) != -ENODEV) {
> +		dev_err(&pdev->dev,
> +			"could not register thermal sensor: %ld\n",
> +			PTR_ERR(info->tzd));
> +		return PTR_ERR(info->tzd);
>  	}
>  
>  	ret = devm_iio_device_register(&pdev->dev, indio_dev);
> @@ -505,7 +547,7 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
>  	return 0;
>  
>  err_map:
> -	if (!info->no_irq && IS_ENABLED(CONFIG_THERMAL_OF))
> +	if (!info->data->support_irq)
>  		iio_map_array_unregister(indio_dev);
>  
>  	pm_runtime_put(&pdev->dev);
> @@ -522,12 +564,9 @@ static int sun4i_gpadc_remove(struct platform_device *pdev)
>  	pm_runtime_put(&pdev->dev);
>  	pm_runtime_disable(&pdev->dev);
>  
> -	if (!IS_ENABLED(CONFIG_THERMAL_OF))
> -		return 0;
> -
>  	thermal_zone_of_sensor_unregister(info->sensor_device, info->tzd);
>  
> -	if (!info->no_irq)
> +	if (!info->data->support_irq)
>  		iio_map_array_unregister(indio_dev);
>  
>  	return 0;
> diff --git a/include/linux/mfd/sun4i-gpadc.h b/include/linux/mfd/sun4i-gpadc.h
> index 54c7c9375c1b..ca59336f246b 100644
> --- a/include/linux/mfd/sun4i-gpadc.h
> +++ b/include/linux/mfd/sun4i-gpadc.h
> @@ -99,11 +99,4 @@
>  	.datasheet_name = _name,				\
>  }
>  
> -struct sun4i_gpadc_dev {
> -	struct device			*dev;
> -	struct regmap			*regmap;
> -	struct regmap_irq_chip_data	*regmap_irqc;
> -	void __iomem			*base;
> -};

And you're dropping that structure.

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>
To: Philipp Rossak <embed3d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	wens-jdAy2FN1RRM@public.gmane.org,
	linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org,
	jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	knaack.h-Mmb7MZpHnFY@public.gmane.org,
	lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org,
	pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org,
	eugen.hristev-UWL1GkI3JZL3oGB3hsPCZA@public.gmane.org,
	rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
	vilhelm.gray-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	quentin.schulz-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org,
	geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org,
	lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org,
	icenowy-h8G6r0blFSE@public.gmane.org,
	arnd-r2nGTMty4D4@public.gmane.org,
	broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	arnaud.pouliquen-qxv4g6HH51o@public.gmane.org,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: [PATCH v3 10/30] iio: adc: rework irq and adc_channel handling
Date: Fri, 31 Aug 2018 10:44:37 +0200	[thread overview]
Message-ID: <20180831084437.mxcwf4wbrxbpoa5e@flea> (raw)
In-Reply-To: <20180830154518.29507-11-embed3d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 12574 bytes --]

Hi,

On Thu, Aug 30, 2018 at 05:44:58PM +0200, Philipp Rossak wrote:
> We rework the irq handling and the adc_channel handling.
> This is requiered since we merge the mfd driver into the adc driver.
> 
> Signed-off-by: Philipp Rossak <embed3d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

This patch is actually the opposite of the previous ones, it has too
many things in it, and sohuld be split :)

> ---
>  drivers/iio/adc/sun4i-gpadc-iio.c | 157 ++++++++++++++++++++++++--------------
>  include/linux/mfd/sun4i-gpadc.h   |   7 --
>  2 files changed, 98 insertions(+), 66 deletions(-)
> 
> diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
> index 658a7e3e3370..a2027614ee0c 100644
> --- a/drivers/iio/adc/sun4i-gpadc-iio.c
> +++ b/drivers/iio/adc/sun4i-gpadc-iio.c
> @@ -49,6 +49,8 @@ static unsigned int sun6i_gpadc_chan_select(unsigned int chan)
>  	return SUN6I_GPADC_CTRL1_ADC_CHAN_SELECT(chan);
>  }
>  
> +struct sun4i_gpadc_iio;
> +
>  struct gpadc_data {
>  	int		temp_offset;
>  	int		temp_scale;
> @@ -56,8 +58,15 @@ struct gpadc_data {
>  	unsigned int	tp_adc_select;
>  	unsigned int	(*adc_chan_select)(unsigned int chan);
>  	unsigned int	adc_chan_mask;
> +	bool		adc_channel;
> +	irqreturn_t	(*ths_irq_thread)(int irq, void *dev_id);
> +	int		(*ths_suspend)(struct sun4i_gpadc_iio *info);
> +	int		(*ths_resume)(struct sun4i_gpadc_iio *info);
> +	bool		support_irq;
>  };
>  
> +static irqreturn_t sun4i_gpadc_data_irq_handler(int irq, void *dev_id);
> +
>  static const struct gpadc_data sun4i_gpadc_data = {
>  	.temp_offset = -1932,
>  	.temp_scale = 133,
> @@ -65,6 +74,9 @@ static const struct gpadc_data sun4i_gpadc_data = {
>  	.tp_adc_select = SUN4I_GPADC_CTRL1_TP_ADC_SELECT,
>  	.adc_chan_select = &sun4i_gpadc_chan_select,
>  	.adc_chan_mask = SUN4I_GPADC_CTRL1_ADC_CHAN_MASK,
> +	.adc_channel = true,
> +	.ths_irq_thread = sun4i_gpadc_data_irq_handler,
> +	.support_irq = true,
>  };
>  
>  static const struct gpadc_data sun5i_gpadc_data = {
> @@ -74,6 +86,9 @@ static const struct gpadc_data sun5i_gpadc_data = {
>  	.tp_adc_select = SUN4I_GPADC_CTRL1_TP_ADC_SELECT,
>  	.adc_chan_select = &sun4i_gpadc_chan_select,
>  	.adc_chan_mask = SUN4I_GPADC_CTRL1_ADC_CHAN_MASK,
> +	.adc_channel = true,
> +	.ths_irq_thread = sun4i_gpadc_data_irq_handler,
> +	.support_irq = true,
>  };
>  
>  static const struct gpadc_data sun6i_gpadc_data = {
> @@ -83,6 +98,9 @@ static const struct gpadc_data sun6i_gpadc_data = {
>  	.tp_adc_select = SUN6I_GPADC_CTRL1_TP_ADC_SELECT,
>  	.adc_chan_select = &sun6i_gpadc_chan_select,
>  	.adc_chan_mask = SUN6I_GPADC_CTRL1_ADC_CHAN_MASK,
> +	.adc_channel = true,
> +	.ths_irq_thread = sun4i_gpadc_data_irq_handler,
> +	.support_irq = true,

So this seems to enable the support for the interrupts without going
through the MFD regmap that was removed in the previous patches.

>  };
>  
>  static const struct gpadc_data sun8i_a33_gpadc_data = {
> @@ -96,13 +114,10 @@ struct sun4i_gpadc_iio {
>  	struct completion		completion;
>  	int				temp_data;
>  	u32				adc_data;
> +	unsigned int			irq_data_type;
>  	struct regmap			*regmap;
> -	unsigned int			fifo_data_irq;
> -	atomic_t			ignore_fifo_data_irq;
> -	unsigned int			temp_data_irq;
> -	atomic_t			ignore_temp_data_irq;
> +	unsigned int			irq;
>  	const struct gpadc_data		*data;
> -	bool				no_irq;

But at the same time, you remove some fields of that structure, and
rename some other without any explanation.

>  	/* prevents concurrent reads of temperature and ADC */
>  	struct mutex			mutex;
>  	struct thermal_zone_device	*tzd;
> @@ -130,6 +145,20 @@ static const struct regmap_config sun4i_gpadc_regmap_config = {
>  	.fast_io = true,
>  };
>  
> +static int sun4i_gpadc_irq_init(struct sun4i_gpadc_iio *info)
> +{
> +	u32 reg;
> +
> +	if (info->irq_data_type == SUN4I_GPADC_IRQ_FIFO_DATA)
> +		reg = SUN4I_GPADC_INT_FIFOC_TEMP_IRQ_EN;
> +	else
> +		reg = SUN4I_GPADC_INT_FIFOC_TEMP_IRQ_EN;
> +
> +	regmap_write(info->regmap, SUN4I_GPADC_INT_FIFOC, reg);
> +
> +	return 0;
> +}
> +
>  static int sun4i_prepare_for_irq(struct iio_dev *indio_dev, int channel,
>  				 unsigned int irq)
>  {
> @@ -151,7 +180,7 @@ static int sun4i_prepare_for_irq(struct iio_dev *indio_dev, int channel,
>  	if (ret)
>  		return ret;
>  
> -	if (irq == info->fifo_data_irq) {
> +	if (irq == SUN4I_GPADC_IRQ_FIFO_DATA) {
>  		ret = regmap_write(info->regmap, SUN4I_GPADC_CTRL1,
>  				   info->data->tp_mode_en |
>  				   info->data->tp_adc_select |
> @@ -172,6 +201,8 @@ static int sun4i_prepare_for_irq(struct iio_dev *indio_dev, int channel,
>  		ret = regmap_write(info->regmap, SUN4I_GPADC_CTRL1,
>  				   info->data->tp_mode_en);
>  	}
> +	if (info->data->support_irq)
> +		sun4i_gpadc_irq_init(info);
>  
>  	if (ret)
>  		return ret;
> @@ -194,11 +225,12 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
>  
>  	mutex_lock(&info->mutex);
>  
> +	info->irq_data_type = irq;

This would need to be explained too

>  	ret = sun4i_prepare_for_irq(indio_dev, channel, irq);
>  	if (ret)
>  		goto err;
>  
> -	enable_irq(irq);
> +	enable_irq(info->irq);
>  
>  	/*
>  	 * The temperature sensor throws an interruption periodically (currently
> @@ -212,7 +244,7 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
>  		goto err;
>  	}
>  
> -	if (irq == info->fifo_data_irq)
> +	if (irq == SUN4I_GPADC_IRQ_FIFO_DATA)
>  		*val = info->adc_data;
>  	else
>  		*val = info->temp_data;
> @@ -222,7 +254,7 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
>  
>  err:
>  	pm_runtime_put_autosuspend(indio_dev->dev.parent);
> -	disable_irq(irq);
> +	disable_irq(info->irq);
>  	mutex_unlock(&info->mutex);
>  
>  	return ret;
> @@ -231,16 +263,15 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
>  static int sun4i_gpadc_adc_read(struct iio_dev *indio_dev, int channel,
>  				int *val)
>  {
> -	struct sun4i_gpadc_iio *info = iio_priv(indio_dev);
> -
> -	return sun4i_gpadc_read(indio_dev, channel, val, info->fifo_data_irq);
> +	return sun4i_gpadc_read(indio_dev, channel, val,
> +			SUN4I_GPADC_IRQ_FIFO_DATA);
>  }
>  
>  static int sun4i_gpadc_temp_read(struct iio_dev *indio_dev, int *val)
>  {
>  	struct sun4i_gpadc_iio *info = iio_priv(indio_dev);
>  
> -	if (info->no_irq) {
> +	if (!info->data->support_irq) {
>  		pm_runtime_get_sync(indio_dev->dev.parent);
>  
>  		regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA, val);
> @@ -251,7 +282,7 @@ static int sun4i_gpadc_temp_read(struct iio_dev *indio_dev, int *val)
>  		return 0;
>  	}
>  
> -	return sun4i_gpadc_read(indio_dev, 0, val, info->temp_data_irq);
> +	return sun4i_gpadc_read(indio_dev, 0, val, SUN4I_GPADC_IRQ_TEMP_DATA);
>  }
>  
>  static int sun4i_gpadc_temp_offset(struct iio_dev *indio_dev, int *val)
> @@ -320,31 +351,21 @@ static const struct iio_info sun4i_gpadc_iio_info = {
>  	.read_raw = sun4i_gpadc_read_raw,
>  };
>  
> -static irqreturn_t sun4i_gpadc_temp_data_irq_handler(int irq, void *dev_id)
> +static irqreturn_t sun4i_gpadc_data_irq_handler(int irq, void *dev_id)
>  {
>  	struct sun4i_gpadc_iio *info = dev_id;
>  
> -	if (atomic_read(&info->ignore_temp_data_irq))
> -		goto out;
> -
> -	if (!regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA, &info->temp_data))
> -		complete(&info->completion);
> -
> -out:
> -	return IRQ_HANDLED;
> -}
> -
> -static irqreturn_t sun4i_gpadc_fifo_data_irq_handler(int irq, void *dev_id)
> -{
> -	struct sun4i_gpadc_iio *info = dev_id;
> -
> -	if (atomic_read(&info->ignore_fifo_data_irq))
> -		goto out;
> -
> -	if (!regmap_read(info->regmap, SUN4I_GPADC_DATA, &info->adc_data))
> -		complete(&info->completion);
> -
> -out:
> +	if (info->irq_data_type == SUN4I_GPADC_IRQ_FIFO_DATA) {
> +		/* read fifo data */
> +		if (!regmap_read(info->regmap, SUN4I_GPADC_DATA,
> +					&info->adc_data))
> +			complete(&info->completion);
> +	} else {
> +		/* read temp data */
> +		if (!regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA,
> +					&info->temp_data))
> +			complete(&info->completion);
> +	}
>  	return IRQ_HANDLED;
>  }
>  
> @@ -356,6 +377,8 @@ static int sun4i_gpadc_runtime_suspend(struct device *dev)
>  	regmap_write(info->regmap, SUN4I_GPADC_CTRL1, 0);
>  	/* Disable temperature sensor on IP */
>  	regmap_write(info->regmap, SUN4I_GPADC_TPR, 0);
> +	/* Disable irq*/
> +	regmap_write(info->regmap, SUN4I_GPADC_INT_FIFOC, 0);
>  
>  	return 0;
>  }
> @@ -378,6 +401,7 @@ static int sun4i_gpadc_runtime_resume(struct device *dev)
>  		     SUN4I_GPADC_TPR_TEMP_ENABLE |
>  		     SUN4I_GPADC_TPR_TEMP_PERIOD(800));
>  
> +
>  	return 0;
>  }
>  
> @@ -426,8 +450,6 @@ static int sun4i_gpadc_probe_dt(struct platform_device *pdev,
>  	if (!info->data)
>  		return -ENODEV;
>  
> -	info->no_irq = true;
> -
>  	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	base = devm_ioremap_resource(&pdev->dev, mem);
>  	if (IS_ERR(base))
> @@ -441,8 +463,25 @@ static int sun4i_gpadc_probe_dt(struct platform_device *pdev,
>  		return ret;
>  	}
>  
> -	if (IS_ENABLED(CONFIG_THERMAL_OF))
> -		info->sensor_device = &pdev->dev;

You're also dropping the THERMAL_OF conditions

> +	if (info->data->support_irq) {
> +
> +		/* ths interrupt */
> +		info->irq = platform_get_irq(pdev, 0);
> +
> +		ret = devm_request_threaded_irq(&pdev->dev, info->irq,
> +				NULL, info->data->ths_irq_thread,
> +				IRQF_ONESHOT, dev_name(&pdev->dev), info);

Why do you need a threaded interrupt?

> +		if (info->data->adc_channel)
> +			disable_irq(info->irq);

Does it still needs to be disabled? Why?

> +		if (ret) {
> +			dev_err(&pdev->dev, "failed to add ths irq: %d\n", ret);
> +			return ret;
> +		}
> +	}
> +
> +	info->sensor_device = &pdev->dev;
>  
>  	return 0;
>  }
> @@ -469,6 +508,11 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
>  	indio_dev->info = &sun4i_gpadc_iio_info;
>  	indio_dev->modes = INDIO_DIRECT_MODE;
>  
> +	if (&info->data->adc_channel) {
> +		indio_dev->num_channels = ARRAY_SIZE(sun4i_gpadc_channels);
> +		indio_dev->channels = sun4i_gpadc_channels;
> +	}
> +
>  	ret = sun4i_gpadc_probe_dt(pdev, indio_dev);
>  
>  	if (ret)
> @@ -480,20 +524,18 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
>  	pm_runtime_set_suspended(&pdev->dev);
>  	pm_runtime_enable(&pdev->dev);
>  
> -	if (IS_ENABLED(CONFIG_THERMAL_OF)) {
> -		info->tzd = thermal_zone_of_sensor_register(info->sensor_device,
> -							    0, info,
> -							    &sun4i_ts_tz_ops);
> -		/*
> -		 * Do not fail driver probing when failing to register in
> -		 * thermal because no thermal DT node is found.
> -		 */
> -		if (IS_ERR(info->tzd) && PTR_ERR(info->tzd) != -ENODEV) {
> -			dev_err(&pdev->dev,
> -				"could not register thermal sensor: %ld\n",
> -				PTR_ERR(info->tzd));
> -			return PTR_ERR(info->tzd);
> -		}
> +	info->tzd = thermal_zone_of_sensor_register(info->sensor_device,
> +						    0, info,
> +						    &sun4i_ts_tz_ops);
> +	/*
> +	 * Do not fail driver probing when failing to register in
> +	 * thermal because no thermal DT node is found.
> +	 */
> +	if (IS_ERR(info->tzd) && PTR_ERR(info->tzd) != -ENODEV) {
> +		dev_err(&pdev->dev,
> +			"could not register thermal sensor: %ld\n",
> +			PTR_ERR(info->tzd));
> +		return PTR_ERR(info->tzd);
>  	}
>  
>  	ret = devm_iio_device_register(&pdev->dev, indio_dev);
> @@ -505,7 +547,7 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
>  	return 0;
>  
>  err_map:
> -	if (!info->no_irq && IS_ENABLED(CONFIG_THERMAL_OF))
> +	if (!info->data->support_irq)
>  		iio_map_array_unregister(indio_dev);
>  
>  	pm_runtime_put(&pdev->dev);
> @@ -522,12 +564,9 @@ static int sun4i_gpadc_remove(struct platform_device *pdev)
>  	pm_runtime_put(&pdev->dev);
>  	pm_runtime_disable(&pdev->dev);
>  
> -	if (!IS_ENABLED(CONFIG_THERMAL_OF))
> -		return 0;
> -
>  	thermal_zone_of_sensor_unregister(info->sensor_device, info->tzd);
>  
> -	if (!info->no_irq)
> +	if (!info->data->support_irq)
>  		iio_map_array_unregister(indio_dev);
>  
>  	return 0;
> diff --git a/include/linux/mfd/sun4i-gpadc.h b/include/linux/mfd/sun4i-gpadc.h
> index 54c7c9375c1b..ca59336f246b 100644
> --- a/include/linux/mfd/sun4i-gpadc.h
> +++ b/include/linux/mfd/sun4i-gpadc.h
> @@ -99,11 +99,4 @@
>  	.datasheet_name = _name,				\
>  }
>  
> -struct sun4i_gpadc_dev {
> -	struct device			*dev;
> -	struct regmap			*regmap;
> -	struct regmap_irq_chip_data	*regmap_irqc;
> -	void __iomem			*base;
> -};

And you're dropping that structure.

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

WARNING: multiple messages have this Message-ID (diff)
From: maxime.ripard@bootlin.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 10/30] iio: adc: rework irq and adc_channel handling
Date: Fri, 31 Aug 2018 10:44:37 +0200	[thread overview]
Message-ID: <20180831084437.mxcwf4wbrxbpoa5e@flea> (raw)
In-Reply-To: <20180830154518.29507-11-embed3d@gmail.com>

Hi,

On Thu, Aug 30, 2018 at 05:44:58PM +0200, Philipp Rossak wrote:
> We rework the irq handling and the adc_channel handling.
> This is requiered since we merge the mfd driver into the adc driver.
> 
> Signed-off-by: Philipp Rossak <embed3d@gmail.com>

This patch is actually the opposite of the previous ones, it has too
many things in it, and sohuld be split :)

> ---
>  drivers/iio/adc/sun4i-gpadc-iio.c | 157 ++++++++++++++++++++++++--------------
>  include/linux/mfd/sun4i-gpadc.h   |   7 --
>  2 files changed, 98 insertions(+), 66 deletions(-)
> 
> diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
> index 658a7e3e3370..a2027614ee0c 100644
> --- a/drivers/iio/adc/sun4i-gpadc-iio.c
> +++ b/drivers/iio/adc/sun4i-gpadc-iio.c
> @@ -49,6 +49,8 @@ static unsigned int sun6i_gpadc_chan_select(unsigned int chan)
>  	return SUN6I_GPADC_CTRL1_ADC_CHAN_SELECT(chan);
>  }
>  
> +struct sun4i_gpadc_iio;
> +
>  struct gpadc_data {
>  	int		temp_offset;
>  	int		temp_scale;
> @@ -56,8 +58,15 @@ struct gpadc_data {
>  	unsigned int	tp_adc_select;
>  	unsigned int	(*adc_chan_select)(unsigned int chan);
>  	unsigned int	adc_chan_mask;
> +	bool		adc_channel;
> +	irqreturn_t	(*ths_irq_thread)(int irq, void *dev_id);
> +	int		(*ths_suspend)(struct sun4i_gpadc_iio *info);
> +	int		(*ths_resume)(struct sun4i_gpadc_iio *info);
> +	bool		support_irq;
>  };
>  
> +static irqreturn_t sun4i_gpadc_data_irq_handler(int irq, void *dev_id);
> +
>  static const struct gpadc_data sun4i_gpadc_data = {
>  	.temp_offset = -1932,
>  	.temp_scale = 133,
> @@ -65,6 +74,9 @@ static const struct gpadc_data sun4i_gpadc_data = {
>  	.tp_adc_select = SUN4I_GPADC_CTRL1_TP_ADC_SELECT,
>  	.adc_chan_select = &sun4i_gpadc_chan_select,
>  	.adc_chan_mask = SUN4I_GPADC_CTRL1_ADC_CHAN_MASK,
> +	.adc_channel = true,
> +	.ths_irq_thread = sun4i_gpadc_data_irq_handler,
> +	.support_irq = true,
>  };
>  
>  static const struct gpadc_data sun5i_gpadc_data = {
> @@ -74,6 +86,9 @@ static const struct gpadc_data sun5i_gpadc_data = {
>  	.tp_adc_select = SUN4I_GPADC_CTRL1_TP_ADC_SELECT,
>  	.adc_chan_select = &sun4i_gpadc_chan_select,
>  	.adc_chan_mask = SUN4I_GPADC_CTRL1_ADC_CHAN_MASK,
> +	.adc_channel = true,
> +	.ths_irq_thread = sun4i_gpadc_data_irq_handler,
> +	.support_irq = true,
>  };
>  
>  static const struct gpadc_data sun6i_gpadc_data = {
> @@ -83,6 +98,9 @@ static const struct gpadc_data sun6i_gpadc_data = {
>  	.tp_adc_select = SUN6I_GPADC_CTRL1_TP_ADC_SELECT,
>  	.adc_chan_select = &sun6i_gpadc_chan_select,
>  	.adc_chan_mask = SUN6I_GPADC_CTRL1_ADC_CHAN_MASK,
> +	.adc_channel = true,
> +	.ths_irq_thread = sun4i_gpadc_data_irq_handler,
> +	.support_irq = true,

So this seems to enable the support for the interrupts without going
through the MFD regmap that was removed in the previous patches.

>  };
>  
>  static const struct gpadc_data sun8i_a33_gpadc_data = {
> @@ -96,13 +114,10 @@ struct sun4i_gpadc_iio {
>  	struct completion		completion;
>  	int				temp_data;
>  	u32				adc_data;
> +	unsigned int			irq_data_type;
>  	struct regmap			*regmap;
> -	unsigned int			fifo_data_irq;
> -	atomic_t			ignore_fifo_data_irq;
> -	unsigned int			temp_data_irq;
> -	atomic_t			ignore_temp_data_irq;
> +	unsigned int			irq;
>  	const struct gpadc_data		*data;
> -	bool				no_irq;

But at the same time, you remove some fields of that structure, and
rename some other without any explanation.

>  	/* prevents concurrent reads of temperature and ADC */
>  	struct mutex			mutex;
>  	struct thermal_zone_device	*tzd;
> @@ -130,6 +145,20 @@ static const struct regmap_config sun4i_gpadc_regmap_config = {
>  	.fast_io = true,
>  };
>  
> +static int sun4i_gpadc_irq_init(struct sun4i_gpadc_iio *info)
> +{
> +	u32 reg;
> +
> +	if (info->irq_data_type == SUN4I_GPADC_IRQ_FIFO_DATA)
> +		reg = SUN4I_GPADC_INT_FIFOC_TEMP_IRQ_EN;
> +	else
> +		reg = SUN4I_GPADC_INT_FIFOC_TEMP_IRQ_EN;
> +
> +	regmap_write(info->regmap, SUN4I_GPADC_INT_FIFOC, reg);
> +
> +	return 0;
> +}
> +
>  static int sun4i_prepare_for_irq(struct iio_dev *indio_dev, int channel,
>  				 unsigned int irq)
>  {
> @@ -151,7 +180,7 @@ static int sun4i_prepare_for_irq(struct iio_dev *indio_dev, int channel,
>  	if (ret)
>  		return ret;
>  
> -	if (irq == info->fifo_data_irq) {
> +	if (irq == SUN4I_GPADC_IRQ_FIFO_DATA) {
>  		ret = regmap_write(info->regmap, SUN4I_GPADC_CTRL1,
>  				   info->data->tp_mode_en |
>  				   info->data->tp_adc_select |
> @@ -172,6 +201,8 @@ static int sun4i_prepare_for_irq(struct iio_dev *indio_dev, int channel,
>  		ret = regmap_write(info->regmap, SUN4I_GPADC_CTRL1,
>  				   info->data->tp_mode_en);
>  	}
> +	if (info->data->support_irq)
> +		sun4i_gpadc_irq_init(info);
>  
>  	if (ret)
>  		return ret;
> @@ -194,11 +225,12 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
>  
>  	mutex_lock(&info->mutex);
>  
> +	info->irq_data_type = irq;

This would need to be explained too

>  	ret = sun4i_prepare_for_irq(indio_dev, channel, irq);
>  	if (ret)
>  		goto err;
>  
> -	enable_irq(irq);
> +	enable_irq(info->irq);
>  
>  	/*
>  	 * The temperature sensor throws an interruption periodically (currently
> @@ -212,7 +244,7 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
>  		goto err;
>  	}
>  
> -	if (irq == info->fifo_data_irq)
> +	if (irq == SUN4I_GPADC_IRQ_FIFO_DATA)
>  		*val = info->adc_data;
>  	else
>  		*val = info->temp_data;
> @@ -222,7 +254,7 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
>  
>  err:
>  	pm_runtime_put_autosuspend(indio_dev->dev.parent);
> -	disable_irq(irq);
> +	disable_irq(info->irq);
>  	mutex_unlock(&info->mutex);
>  
>  	return ret;
> @@ -231,16 +263,15 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
>  static int sun4i_gpadc_adc_read(struct iio_dev *indio_dev, int channel,
>  				int *val)
>  {
> -	struct sun4i_gpadc_iio *info = iio_priv(indio_dev);
> -
> -	return sun4i_gpadc_read(indio_dev, channel, val, info->fifo_data_irq);
> +	return sun4i_gpadc_read(indio_dev, channel, val,
> +			SUN4I_GPADC_IRQ_FIFO_DATA);
>  }
>  
>  static int sun4i_gpadc_temp_read(struct iio_dev *indio_dev, int *val)
>  {
>  	struct sun4i_gpadc_iio *info = iio_priv(indio_dev);
>  
> -	if (info->no_irq) {
> +	if (!info->data->support_irq) {
>  		pm_runtime_get_sync(indio_dev->dev.parent);
>  
>  		regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA, val);
> @@ -251,7 +282,7 @@ static int sun4i_gpadc_temp_read(struct iio_dev *indio_dev, int *val)
>  		return 0;
>  	}
>  
> -	return sun4i_gpadc_read(indio_dev, 0, val, info->temp_data_irq);
> +	return sun4i_gpadc_read(indio_dev, 0, val, SUN4I_GPADC_IRQ_TEMP_DATA);
>  }
>  
>  static int sun4i_gpadc_temp_offset(struct iio_dev *indio_dev, int *val)
> @@ -320,31 +351,21 @@ static const struct iio_info sun4i_gpadc_iio_info = {
>  	.read_raw = sun4i_gpadc_read_raw,
>  };
>  
> -static irqreturn_t sun4i_gpadc_temp_data_irq_handler(int irq, void *dev_id)
> +static irqreturn_t sun4i_gpadc_data_irq_handler(int irq, void *dev_id)
>  {
>  	struct sun4i_gpadc_iio *info = dev_id;
>  
> -	if (atomic_read(&info->ignore_temp_data_irq))
> -		goto out;
> -
> -	if (!regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA, &info->temp_data))
> -		complete(&info->completion);
> -
> -out:
> -	return IRQ_HANDLED;
> -}
> -
> -static irqreturn_t sun4i_gpadc_fifo_data_irq_handler(int irq, void *dev_id)
> -{
> -	struct sun4i_gpadc_iio *info = dev_id;
> -
> -	if (atomic_read(&info->ignore_fifo_data_irq))
> -		goto out;
> -
> -	if (!regmap_read(info->regmap, SUN4I_GPADC_DATA, &info->adc_data))
> -		complete(&info->completion);
> -
> -out:
> +	if (info->irq_data_type == SUN4I_GPADC_IRQ_FIFO_DATA) {
> +		/* read fifo data */
> +		if (!regmap_read(info->regmap, SUN4I_GPADC_DATA,
> +					&info->adc_data))
> +			complete(&info->completion);
> +	} else {
> +		/* read temp data */
> +		if (!regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA,
> +					&info->temp_data))
> +			complete(&info->completion);
> +	}
>  	return IRQ_HANDLED;
>  }
>  
> @@ -356,6 +377,8 @@ static int sun4i_gpadc_runtime_suspend(struct device *dev)
>  	regmap_write(info->regmap, SUN4I_GPADC_CTRL1, 0);
>  	/* Disable temperature sensor on IP */
>  	regmap_write(info->regmap, SUN4I_GPADC_TPR, 0);
> +	/* Disable irq*/
> +	regmap_write(info->regmap, SUN4I_GPADC_INT_FIFOC, 0);
>  
>  	return 0;
>  }
> @@ -378,6 +401,7 @@ static int sun4i_gpadc_runtime_resume(struct device *dev)
>  		     SUN4I_GPADC_TPR_TEMP_ENABLE |
>  		     SUN4I_GPADC_TPR_TEMP_PERIOD(800));
>  
> +
>  	return 0;
>  }
>  
> @@ -426,8 +450,6 @@ static int sun4i_gpadc_probe_dt(struct platform_device *pdev,
>  	if (!info->data)
>  		return -ENODEV;
>  
> -	info->no_irq = true;
> -
>  	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	base = devm_ioremap_resource(&pdev->dev, mem);
>  	if (IS_ERR(base))
> @@ -441,8 +463,25 @@ static int sun4i_gpadc_probe_dt(struct platform_device *pdev,
>  		return ret;
>  	}
>  
> -	if (IS_ENABLED(CONFIG_THERMAL_OF))
> -		info->sensor_device = &pdev->dev;

You're also dropping the THERMAL_OF conditions

> +	if (info->data->support_irq) {
> +
> +		/* ths interrupt */
> +		info->irq = platform_get_irq(pdev, 0);
> +
> +		ret = devm_request_threaded_irq(&pdev->dev, info->irq,
> +				NULL, info->data->ths_irq_thread,
> +				IRQF_ONESHOT, dev_name(&pdev->dev), info);

Why do you need a threaded interrupt?

> +		if (info->data->adc_channel)
> +			disable_irq(info->irq);

Does it still needs to be disabled? Why?

> +		if (ret) {
> +			dev_err(&pdev->dev, "failed to add ths irq: %d\n", ret);
> +			return ret;
> +		}
> +	}
> +
> +	info->sensor_device = &pdev->dev;
>  
>  	return 0;
>  }
> @@ -469,6 +508,11 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
>  	indio_dev->info = &sun4i_gpadc_iio_info;
>  	indio_dev->modes = INDIO_DIRECT_MODE;
>  
> +	if (&info->data->adc_channel) {
> +		indio_dev->num_channels = ARRAY_SIZE(sun4i_gpadc_channels);
> +		indio_dev->channels = sun4i_gpadc_channels;
> +	}
> +
>  	ret = sun4i_gpadc_probe_dt(pdev, indio_dev);
>  
>  	if (ret)
> @@ -480,20 +524,18 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
>  	pm_runtime_set_suspended(&pdev->dev);
>  	pm_runtime_enable(&pdev->dev);
>  
> -	if (IS_ENABLED(CONFIG_THERMAL_OF)) {
> -		info->tzd = thermal_zone_of_sensor_register(info->sensor_device,
> -							    0, info,
> -							    &sun4i_ts_tz_ops);
> -		/*
> -		 * Do not fail driver probing when failing to register in
> -		 * thermal because no thermal DT node is found.
> -		 */
> -		if (IS_ERR(info->tzd) && PTR_ERR(info->tzd) != -ENODEV) {
> -			dev_err(&pdev->dev,
> -				"could not register thermal sensor: %ld\n",
> -				PTR_ERR(info->tzd));
> -			return PTR_ERR(info->tzd);
> -		}
> +	info->tzd = thermal_zone_of_sensor_register(info->sensor_device,
> +						    0, info,
> +						    &sun4i_ts_tz_ops);
> +	/*
> +	 * Do not fail driver probing when failing to register in
> +	 * thermal because no thermal DT node is found.
> +	 */
> +	if (IS_ERR(info->tzd) && PTR_ERR(info->tzd) != -ENODEV) {
> +		dev_err(&pdev->dev,
> +			"could not register thermal sensor: %ld\n",
> +			PTR_ERR(info->tzd));
> +		return PTR_ERR(info->tzd);
>  	}
>  
>  	ret = devm_iio_device_register(&pdev->dev, indio_dev);
> @@ -505,7 +547,7 @@ static int sun4i_gpadc_probe(struct platform_device *pdev)
>  	return 0;
>  
>  err_map:
> -	if (!info->no_irq && IS_ENABLED(CONFIG_THERMAL_OF))
> +	if (!info->data->support_irq)
>  		iio_map_array_unregister(indio_dev);
>  
>  	pm_runtime_put(&pdev->dev);
> @@ -522,12 +564,9 @@ static int sun4i_gpadc_remove(struct platform_device *pdev)
>  	pm_runtime_put(&pdev->dev);
>  	pm_runtime_disable(&pdev->dev);
>  
> -	if (!IS_ENABLED(CONFIG_THERMAL_OF))
> -		return 0;
> -
>  	thermal_zone_of_sensor_unregister(info->sensor_device, info->tzd);
>  
> -	if (!info->no_irq)
> +	if (!info->data->support_irq)
>  		iio_map_array_unregister(indio_dev);
>  
>  	return 0;
> diff --git a/include/linux/mfd/sun4i-gpadc.h b/include/linux/mfd/sun4i-gpadc.h
> index 54c7c9375c1b..ca59336f246b 100644
> --- a/include/linux/mfd/sun4i-gpadc.h
> +++ b/include/linux/mfd/sun4i-gpadc.h
> @@ -99,11 +99,4 @@
>  	.datasheet_name = _name,				\
>  }
>  
> -struct sun4i_gpadc_dev {
> -	struct device			*dev;
> -	struct regmap			*regmap;
> -	struct regmap_irq_chip_data	*regmap_irqc;
> -	void __iomem			*base;
> -};

And you're dropping that structure.

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180831/80d89845/attachment.sig>

  reply	other threads:[~2018-08-31  8:44 UTC|newest]

Thread overview: 244+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-30 15:44 [PATCH v3 00/30] IIO-based thermal sensor driver for Allwinner H3 and A83T SoC Philipp Rossak
2018-08-30 15:44 ` Philipp Rossak
2018-08-30 15:44 ` Philipp Rossak
2018-08-30 15:44 ` [PATCH v3 01/30] mfd: Makefile: Remove build option for MFD:sun4i-gpadc Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-31  8:25   ` Maxime Ripard
2018-08-31  8:25     ` Maxime Ripard
2018-08-31  8:25     ` Maxime Ripard
2018-09-02 19:58     ` Jonathan Cameron
2018-09-02 19:58       ` Jonathan Cameron
2018-08-30 15:44 ` [PATCH v3 02/30] mfd: Kconfig: Remove MFD_SUN4I_GPADC config option Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-09-02 19:58   ` Jonathan Cameron
2018-09-02 19:58     ` Jonathan Cameron
2018-08-30 15:44 ` [PATCH v3 03/30] iio: adc: Remove ID table Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-30 15:44 ` [PATCH v3 04/30] iio: adc: Kconfig: Update Kconfig to new build options Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-31  8:32   ` Maxime Ripard
2018-08-31  8:32     ` Maxime Ripard
2018-08-31  8:32     ` Maxime Ripard
2018-08-30 15:44 ` [PATCH v3 05/30] iio: adc: move SUN4I_GPADC_CHANNEL define to header file Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-09-02 20:01   ` Jonathan Cameron
2018-09-02 20:01     ` Jonathan Cameron
2018-09-03 14:24     ` Philipp Rossak
2018-09-03 14:24       ` Philipp Rossak
2018-09-03 14:24       ` Philipp Rossak
2018-09-03 17:28       ` Jonathan Cameron
2018-09-03 17:28         ` Jonathan Cameron
2018-08-30 15:44 ` [PATCH v3 06/30] iio: adc: remove ofnode options Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-30 15:44 ` [PATCH v3 07/30] iio: adc: remove mfd_probe & sunwi_irq_init function Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-31  8:34   ` Maxime Ripard
2018-08-31  8:34     ` Maxime Ripard
2018-08-31  8:34     ` Maxime Ripard
2018-08-30 15:44 ` [PATCH v3 08/30] iio: adc: remove hwmon structure Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-31  8:34   ` Maxime Ripard
2018-08-31  8:34     ` Maxime Ripard
2018-08-31  8:34     ` Maxime Ripard
2018-08-30 15:44 ` [PATCH v3 09/30] iio: adc: Threat A33 as thermal sensor and remove non thermal sun4i channel Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-30 16:40   ` [linux-sunxi] " Ondřej Jirman
2018-08-30 16:40     ` Ondřej Jirman
2018-08-30 16:40     ` 'Ondřej Jirman' via linux-sunxi
2018-08-31  8:35   ` Maxime Ripard
2018-08-31  8:35     ` Maxime Ripard
2018-08-31  8:35     ` Maxime Ripard
2018-08-30 15:44 ` [PATCH v3 10/30] iio: adc: rework irq and adc_channel handling Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-31  8:44   ` Maxime Ripard [this message]
2018-08-31  8:44     ` Maxime Ripard
2018-08-31  8:44     ` Maxime Ripard
2018-08-30 15:44 ` [PATCH v3 11/30] iio: adc: add new compatibles Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-30 15:44   ` Philipp Rossak
2018-08-31  8:46   ` Maxime Ripard
2018-08-31  8:46     ` Maxime Ripard
2018-08-31  8:46     ` Maxime Ripard
2018-08-30 15:45 ` [PATCH v3 12/30] mfd: Remove old mfd driver & Move sun4i-gpadc.h to iio/adc/ Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45 ` [PATCH v3 13/30] arm: config: Enable SUN4I_GPADC in defconfig Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45 ` [PATCH v3 14/30] dt-bindings: update the Allwinner GPADC device tree binding for H3 & A83T Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-31  8:48   ` Maxime Ripard
2018-08-31  8:48     ` Maxime Ripard
2018-08-31  8:48     ` Maxime Ripard
2018-09-10 19:44     ` Rob Herring
2018-09-10 19:44       ` Rob Herring
2018-09-10 19:44       ` Rob Herring
2018-09-11  9:12       ` Maxime Ripard
2018-09-11  9:12         ` Maxime Ripard
2018-09-11  9:12         ` Maxime Ripard
2018-08-30 15:45 ` [PATCH v3 15/30] iio: adc: sun4i-gpadc-iio: rename A33-specified registers to contain A33 Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45 ` [PATCH v3 16/30] iio: adc: sun4i-gpadc-iio: rework: readout temp_data Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-31  8:50   ` Maxime Ripard
2018-08-31  8:50     ` Maxime Ripard
2018-08-31  8:50     ` Maxime Ripard
2018-08-30 15:45 ` [PATCH v3 17/30] iio: adc: sun4i-gpadc-iio: rework: support clocks and reset Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-31  9:03   ` Maxime Ripard
2018-08-31  9:03     ` Maxime Ripard
2018-08-31  9:03     ` Maxime Ripard
2018-08-30 15:45 ` [PATCH v3 18/30] iio: adc: sun4i-gpadc-iio: rework: support multiple sensors Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-31  9:05   ` Maxime Ripard
2018-08-31  9:05     ` Maxime Ripard
2018-08-31  9:05     ` Maxime Ripard
2018-09-02 20:11   ` Jonathan Cameron
2018-09-02 20:11     ` Jonathan Cameron
2018-09-03 13:58     ` Philipp Rossak
2018-09-03 13:58       ` Philipp Rossak
2018-09-03 13:58       ` Philipp Rossak
2018-09-03 17:29       ` Jonathan Cameron
2018-09-03 17:29         ` Jonathan Cameron
2018-08-30 15:45 ` [PATCH v3 19/30] iio: adc: sun4i-gpadc-iio: rework: support nvmem calibration data Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-31  9:07   ` Maxime Ripard
2018-08-31  9:07     ` Maxime Ripard
2018-08-31  9:07     ` Maxime Ripard
2018-08-30 15:45 ` [PATCH v3 20/30] iio: adc: sun4i-gpadc-iio: rework: device specific suspend & resume Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-31  9:09   ` Maxime Ripard
2018-08-31  9:09     ` Maxime Ripard
2018-08-31  9:09     ` Maxime Ripard
2018-08-31 12:05     ` Philipp Rossak
2018-08-31 12:05       ` Philipp Rossak
2018-08-31 12:05       ` Philipp Rossak
2018-09-03  9:44       ` Maxime Ripard
2018-09-03  9:44         ` Maxime Ripard
2018-09-03  9:44         ` Maxime Ripard
2018-08-30 15:45 ` [PATCH v3 21/30] iio: adc: sun4i-gpadc-iio: add support for H3 thermal sensor Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 16:27   ` [linux-sunxi] " Ondřej Jirman
2018-08-30 16:27     ` Ondřej Jirman
2018-08-30 16:27     ` 'Ondřej Jirman' via linux-sunxi
2018-08-30 20:00     ` [linux-sunxi] " Philipp Rossak
2018-08-30 20:00       ` Philipp Rossak
2018-08-30 20:00       ` Philipp Rossak
2018-08-30 20:46       ` [linux-sunxi] " Philipp Rossak
2018-08-30 20:46         ` Philipp Rossak
2018-08-30 20:46         ` Philipp Rossak
2018-08-31  9:11   ` Maxime Ripard
2018-08-31  9:11     ` Maxime Ripard
2018-08-31  9:11     ` Maxime Ripard
2018-08-31  9:51     ` Icenowy Zheng
2018-08-31  9:51       ` Icenowy Zheng
2018-08-31 11:58       ` [linux-sunxi] " Philipp Rossak
2018-08-31 11:58         ` Philipp Rossak
2018-08-31 11:58         ` Philipp Rossak
2018-09-03 10:20       ` Maxime Ripard
2018-09-03 10:20         ` Maxime Ripard
2018-09-03 10:20         ` Maxime Ripard
2018-09-03 11:01         ` [linux-sunxi] " Icenowy Zheng
2018-09-03 11:01           ` Icenowy Zheng
2018-09-03 11:01           ` Icenowy Zheng
2018-09-03 11:01           ` Icenowy Zheng
2018-09-05 14:58           ` Maxime Ripard
2018-09-05 14:58             ` Maxime Ripard
2018-09-05 14:58             ` Maxime Ripard
2018-08-31 12:01     ` Philipp Rossak
2018-08-31 12:01       ` Philipp Rossak
2018-08-31 12:01       ` Philipp Rossak
2018-08-30 15:45 ` [PATCH v3 22/30] iio: adc: sun4i-gpadc-iio: add support for A83T " Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45 ` [PATCH v3 23/30] ARM: dts: sunxi-h3-h5: add support for the thermal sensor in H3 and H5 Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45 ` [PATCH v3 24/30] ARM: dts: sun8i: h3: add support for the thermal sensor in H3 Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45 ` [PATCH v3 25/30] ARM: dts: sun8i: h3: add thermal zone to H3 Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-31  9:14   ` Maxime Ripard
2018-08-31  9:14     ` Maxime Ripard
2018-08-31  9:14     ` Maxime Ripard
2018-08-30 15:45 ` [PATCH v3 26/30] ARM: dts: sun8i: h3: enable H3 sid controller Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45 ` [PATCH v3 27/30] ARM: dts: sun8i: h3: use calibration for ths Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-09-04 16:46   ` Emmanuel Vadot
2018-09-04 16:46     ` Emmanuel Vadot
2018-09-06 11:47     ` Philipp Rossak
2018-09-06 11:47       ` Philipp Rossak
2018-09-06 11:47       ` Philipp Rossak
2018-09-06 11:51       ` Maxime Ripard
2018-09-06 11:51         ` Maxime Ripard
2018-09-06 11:51         ` Maxime Ripard
2018-09-06 12:04         ` [linux-sunxi] " Icenowy Zheng
2018-09-06 12:04           ` Icenowy Zheng
2018-09-06 12:04           ` Icenowy Zheng
2018-09-06 12:18           ` Philipp Rossak
2018-09-06 12:18             ` Philipp Rossak
2019-02-19  7:54         ` Allwinner SID THS calibration data cell representation? Chen-Yu Tsai
2019-02-20 14:55           ` Maxime Ripard
2019-02-20 14:55             ` Maxime Ripard
2019-02-21 10:10           ` Emmanuel Vadot
2019-02-21 10:10             ` Emmanuel Vadot
2019-02-21 10:10             ` Emmanuel Vadot
2019-02-25 20:37           ` Philipp Rossak
2019-02-25 20:37             ` Philipp Rossak
2019-02-25 20:37             ` Philipp Rossak
2018-08-30 15:45 ` [PATCH v3 28/30] ARM: dts: sun8i: a83t: add support for the thermal sensor in A83T Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45 ` [PATCH v3 29/30] ARM: dts: sun8i: a83t: add thermal zone to A83T Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 15:45 ` [PATCH v3 30/30] ARM: sun8i: a83t: full range OPP tables and CPUfreq Philipp Rossak
2018-08-30 15:45   ` Philipp Rossak
2018-08-30 16:38   ` [linux-sunxi] " Ondřej Jirman
2018-08-30 16:38     ` Ondřej Jirman
2018-08-30 16:38     ` 'Ondřej Jirman' via linux-sunxi
2018-08-30 20:29     ` [linux-sunxi] " Philipp Rossak
2018-08-30 20:29       ` Philipp Rossak
2018-08-30 20:29       ` Philipp Rossak
2018-09-06  7:24   ` Quentin Schulz
2018-09-06  7:24     ` Quentin Schulz
2018-09-06  7:24     ` Quentin Schulz
2018-09-06 11:39     ` Philipp Rossak
2018-09-06 11:39       ` Philipp Rossak
2018-09-06 11:39       ` Philipp Rossak
2018-09-06 11:42       ` Maxime Ripard
2018-09-06 11:42         ` Maxime Ripard
2018-09-06 11:42         ` Maxime Ripard
2018-09-06 12:06         ` Quentin Schulz
2018-09-06 12:06           ` Quentin Schulz
2018-09-06 12:06           ` Quentin Schulz
2019-03-19 12:30 ` [PATCH v3 00/30] IIO-based thermal sensor driver for Allwinner H3 and A83T SoC Måns Rullgård
2019-03-19 12:30   ` Måns Rullgård
2019-03-19 12:37   ` Maxime Ripard
2019-03-19 12:37     ` Maxime Ripard
2019-03-19 12:37     ` Maxime Ripard
2019-03-19 13:04     ` [linux-sunxi] " Chen-Yu Tsai
2019-03-19 13:04       ` Chen-Yu Tsai
2019-03-19 13:04       ` Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180831084437.mxcwf4wbrxbpoa5e@flea \
    --to=maxime.ripard@bootlin.com \
    --cc=arnaud.pouliquen@st.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=clabbe.montjoie@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=embed3d@gmail.com \
    --cc=eugen.hristev@microchip.com \
    --cc=geert+renesas@glider.be \
    --cc=icenowy@aosc.io \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=linux@armlinux.org.uk \
    --cc=lukas@wunner.de \
    --cc=mark.rutland@arm.com \
    --cc=pmeerw@pmeerw.net \
    --cc=quentin.schulz@bootlin.com \
    --cc=rdunlap@infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=vilhelm.gray@gmail.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.