* [PATCH 0/3] iio: adc: rcar-gyroadc: Misc improvements
@ 2017-10-04 12:08 Geert Uytterhoeven
2017-10-04 12:08 ` [PATCH 1/3] iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on 64-bit Geert Uytterhoeven
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2017-10-04 12:08 UTC (permalink / raw)
To: Jonathan Cameron, Marek Vasut
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
linux-iio, linux-renesas-soc, Geert Uytterhoeven
Hi Jonathan, Marek,
This patch series contains a few improvements for the driver for the
R-Car GyroADC block, which can be found on R-Car Gen2 (arm32) and Gen3
(arm64) SoCs.
Thanks!
Geert Uytterhoeven (3):
iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on
64-bit
iio: adc: rcar-gyroadc: Enable compile-testing on non-ARM
iio: adc: rcar-gyroadc: Use of_device_get_match_data() helper
drivers/iio/adc/Kconfig | 2 +-
drivers/iio/adc/rcar-gyroadc.c | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
--
2.7.4
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/3] iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on 64-bit
2017-10-04 12:08 [PATCH 0/3] iio: adc: rcar-gyroadc: Misc improvements Geert Uytterhoeven
@ 2017-10-04 12:08 ` Geert Uytterhoeven
2017-10-05 9:11 ` Simon Horman
2017-10-04 12:08 ` [PATCH 2/3] iio: adc: rcar-gyroadc: Enable compile-testing on non-ARM Geert Uytterhoeven
2017-10-04 12:08 ` [PATCH 3/3] iio: adc: rcar-gyroadc: Use of_device_get_match_data() helper Geert Uytterhoeven
2 siblings, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2017-10-04 12:08 UTC (permalink / raw)
To: Jonathan Cameron, Marek Vasut
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
linux-iio, linux-renesas-soc, Geert Uytterhoeven
On 64-bit:
drivers/iio/adc/rcar-gyroadc.c: In function 'rcar_gyroadc_parse_subdevs':
drivers/iio/adc/rcar-gyroadc.c:352:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
childmode = (unsigned int)of_id->data;
^
Cast the pointer to uintptr_t instead of unsigned int to fix this.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Currently this driver can be enabled on arm32 only, but the hardware
block can be found in some R-Car Gen3 SoCs, which are arm64.
---
drivers/iio/adc/rcar-gyroadc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c
index 2cb5397ceeea9ff4..0098c66a19572400 100644
--- a/drivers/iio/adc/rcar-gyroadc.c
+++ b/drivers/iio/adc/rcar-gyroadc.c
@@ -348,7 +348,7 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev)
continue;
}
- childmode = (unsigned int)of_id->data;
+ childmode = (uintptr_t)of_id->data;
switch (childmode) {
case RCAR_GYROADC_MODE_SELECT_1_MB88101A:
sample_width = 12;
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] iio: adc: rcar-gyroadc: Enable compile-testing on non-ARM
2017-10-04 12:08 [PATCH 0/3] iio: adc: rcar-gyroadc: Misc improvements Geert Uytterhoeven
2017-10-04 12:08 ` [PATCH 1/3] iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on 64-bit Geert Uytterhoeven
@ 2017-10-04 12:08 ` Geert Uytterhoeven
2017-10-05 9:12 ` Simon Horman
2017-10-04 12:08 ` [PATCH 3/3] iio: adc: rcar-gyroadc: Use of_device_get_match_data() helper Geert Uytterhoeven
2 siblings, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2017-10-04 12:08 UTC (permalink / raw)
To: Jonathan Cameron, Marek Vasut
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
linux-iio, linux-renesas-soc, Geert Uytterhoeven
The rcar-gyroadc driver compiles fine on other platforms, hence increase
compile coverage.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/iio/adc/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index 57625653fcb6da69..383400b678c8c692 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -593,7 +593,7 @@ config QCOM_SPMI_VADC
config RCAR_GYRO_ADC
tristate "Renesas R-Car GyroADC driver"
- depends on ARCH_RCAR_GEN2 || (ARM && COMPILE_TEST)
+ depends on ARCH_RCAR_GEN2 || COMPILE_TEST
help
Say yes here to build support for the GyroADC found in Renesas
R-Car Gen2 SoCs. This block is a simple SPI offload engine for
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] iio: adc: rcar-gyroadc: Use of_device_get_match_data() helper
2017-10-04 12:08 [PATCH 0/3] iio: adc: rcar-gyroadc: Misc improvements Geert Uytterhoeven
2017-10-04 12:08 ` [PATCH 1/3] iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on 64-bit Geert Uytterhoeven
2017-10-04 12:08 ` [PATCH 2/3] iio: adc: rcar-gyroadc: Enable compile-testing on non-ARM Geert Uytterhoeven
@ 2017-10-04 12:08 ` Geert Uytterhoeven
2017-10-05 9:12 ` Simon Horman
2 siblings, 1 reply; 10+ messages in thread
From: Geert Uytterhoeven @ 2017-10-04 12:08 UTC (permalink / raw)
To: Jonathan Cameron, Marek Vasut
Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
linux-iio, linux-renesas-soc, Geert Uytterhoeven
Use the of_device_get_match_data() helper instead of open coding.
Note that the rcar-gyroadc driver is used with DT only, so there's
always a valid match.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/iio/adc/rcar-gyroadc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c
index 0098c66a19572400..dcb50172186f49ab 100644
--- a/drivers/iio/adc/rcar-gyroadc.c
+++ b/drivers/iio/adc/rcar-gyroadc.c
@@ -487,8 +487,6 @@ static int rcar_gyroadc_init_supplies(struct iio_dev *indio_dev)
static int rcar_gyroadc_probe(struct platform_device *pdev)
{
- const struct of_device_id *of_id =
- of_match_device(rcar_gyroadc_match, &pdev->dev);
struct device *dev = &pdev->dev;
struct rcar_gyroadc *priv;
struct iio_dev *indio_dev;
@@ -525,7 +523,8 @@ static int rcar_gyroadc_probe(struct platform_device *pdev)
if (ret)
return ret;
- priv->model = (enum rcar_gyroadc_model)of_id->data;
+ priv->model = (enum rcar_gyroadc_model)
+ of_device_get_match_data(&pdev->dev);
platform_set_drvdata(pdev, indio_dev);
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on 64-bit
2017-10-04 12:08 ` [PATCH 1/3] iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on 64-bit Geert Uytterhoeven
@ 2017-10-05 9:11 ` Simon Horman
2017-10-07 11:17 ` Jonathan Cameron
0 siblings, 1 reply; 10+ messages in thread
From: Simon Horman @ 2017-10-05 9:11 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Jonathan Cameron, Marek Vasut, Hartmut Knaack,
Lars-Peter Clausen, Peter Meerwald-Stadler, linux-iio,
linux-renesas-soc
On Wed, Oct 04, 2017 at 02:08:24PM +0200, Geert Uytterhoeven wrote:
> On 64-bit:
>
> drivers/iio/adc/rcar-gyroadc.c: In function 'rcar_gyroadc_parse_subdevs':
> drivers/iio/adc/rcar-gyroadc.c:352:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> childmode = (unsigned int)of_id->data;
> ^
>
> Cast the pointer to uintptr_t instead of unsigned int to fix this.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] iio: adc: rcar-gyroadc: Enable compile-testing on non-ARM
2017-10-04 12:08 ` [PATCH 2/3] iio: adc: rcar-gyroadc: Enable compile-testing on non-ARM Geert Uytterhoeven
@ 2017-10-05 9:12 ` Simon Horman
2017-10-07 11:19 ` Jonathan Cameron
0 siblings, 1 reply; 10+ messages in thread
From: Simon Horman @ 2017-10-05 9:12 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Jonathan Cameron, Marek Vasut, Hartmut Knaack,
Lars-Peter Clausen, Peter Meerwald-Stadler, linux-iio,
linux-renesas-soc
On Wed, Oct 04, 2017 at 02:08:25PM +0200, Geert Uytterhoeven wrote:
> The rcar-gyroadc driver compiles fine on other platforms, hence increase
> compile coverage.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] iio: adc: rcar-gyroadc: Use of_device_get_match_data() helper
2017-10-04 12:08 ` [PATCH 3/3] iio: adc: rcar-gyroadc: Use of_device_get_match_data() helper Geert Uytterhoeven
@ 2017-10-05 9:12 ` Simon Horman
2017-10-07 11:20 ` Jonathan Cameron
0 siblings, 1 reply; 10+ messages in thread
From: Simon Horman @ 2017-10-05 9:12 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Jonathan Cameron, Marek Vasut, Hartmut Knaack,
Lars-Peter Clausen, Peter Meerwald-Stadler, linux-iio,
linux-renesas-soc
On Wed, Oct 04, 2017 at 02:08:26PM +0200, Geert Uytterhoeven wrote:
> Use the of_device_get_match_data() helper instead of open coding.
> Note that the rcar-gyroadc driver is used with DT only, so there's
> always a valid match.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on 64-bit
2017-10-05 9:11 ` Simon Horman
@ 2017-10-07 11:17 ` Jonathan Cameron
0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2017-10-07 11:17 UTC (permalink / raw)
To: Simon Horman
Cc: Geert Uytterhoeven, Marek Vasut, Hartmut Knaack,
Lars-Peter Clausen, Peter Meerwald-Stadler, linux-iio,
linux-renesas-soc
On Thu, 5 Oct 2017 11:11:51 +0200
Simon Horman <horms@verge.net.au> wrote:
> On Wed, Oct 04, 2017 at 02:08:24PM +0200, Geert Uytterhoeven wrote:
> > On 64-bit:
> >
> > drivers/iio/adc/rcar-gyroadc.c: In function 'rcar_gyroadc_parse_subdevs':
> > drivers/iio/adc/rcar-gyroadc.c:352:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> > childmode = (unsigned int)of_id->data;
> > ^
> >
> > Cast the pointer to uintptr_t instead of unsigned int to fix this.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Applied to the togreg branch of iio.git and pushed out as testing for the
autobuilders to play with it.
Thanks,
Jonathan
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] iio: adc: rcar-gyroadc: Enable compile-testing on non-ARM
2017-10-05 9:12 ` Simon Horman
@ 2017-10-07 11:19 ` Jonathan Cameron
0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2017-10-07 11:19 UTC (permalink / raw)
To: Simon Horman
Cc: Geert Uytterhoeven, Marek Vasut, Hartmut Knaack,
Lars-Peter Clausen, Peter Meerwald-Stadler, linux-iio,
linux-renesas-soc
On Thu, 5 Oct 2017 11:12:21 +0200
Simon Horman <horms@verge.net.au> wrote:
> On Wed, Oct 04, 2017 at 02:08:25PM +0200, Geert Uytterhoeven wrote:
> > The rcar-gyroadc driver compiles fine on other platforms, hence increase
> > compile coverage.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] iio: adc: rcar-gyroadc: Use of_device_get_match_data() helper
2017-10-05 9:12 ` Simon Horman
@ 2017-10-07 11:20 ` Jonathan Cameron
0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Cameron @ 2017-10-07 11:20 UTC (permalink / raw)
To: Simon Horman
Cc: Geert Uytterhoeven, Marek Vasut, Hartmut Knaack,
Lars-Peter Clausen, Peter Meerwald-Stadler, linux-iio,
linux-renesas-soc
On Thu, 5 Oct 2017 11:12:59 +0200
Simon Horman <horms@verge.net.au> wrote:
> On Wed, Oct 04, 2017 at 02:08:26PM +0200, Geert Uytterhoeven wrote:
> > Use the of_device_get_match_data() helper instead of open coding.
> > Note that the rcar-gyroadc driver is used with DT only, so there's
> > always a valid match.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
>
Applied to the togreg branch of iio.git and pushed out
as testing for the autobuilders to play with it.
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2017-10-07 11:21 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-04 12:08 [PATCH 0/3] iio: adc: rcar-gyroadc: Misc improvements Geert Uytterhoeven
2017-10-04 12:08 ` [PATCH 1/3] iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on 64-bit Geert Uytterhoeven
2017-10-05 9:11 ` Simon Horman
2017-10-07 11:17 ` Jonathan Cameron
2017-10-04 12:08 ` [PATCH 2/3] iio: adc: rcar-gyroadc: Enable compile-testing on non-ARM Geert Uytterhoeven
2017-10-05 9:12 ` Simon Horman
2017-10-07 11:19 ` Jonathan Cameron
2017-10-04 12:08 ` [PATCH 3/3] iio: adc: rcar-gyroadc: Use of_device_get_match_data() helper Geert Uytterhoeven
2017-10-05 9:12 ` Simon Horman
2017-10-07 11:20 ` Jonathan Cameron
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.