* [PATCH 2/3] lp8788-charger: fix ADC channel names
@ 2012-10-18 6:11 Kim, Milo
2012-10-19 15:41 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Kim, Milo @ 2012-10-18 6:11 UTC (permalink / raw)
To: cbou; +Cc: Anton Vorontsov, Lars-Peter Clausen, Jonathan Cameron, linux-kernel
LP8788 IIO ADC driver and platform data have specific naming convention
for ADC channels. That is using prefix 'lp8788_'.
To keep this rule, ADC channel names are changed.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
---
drivers/power/lp8788-charger.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/power/lp8788-charger.c b/drivers/power/lp8788-charger.c
index 614e6aa..02fc9ab 100644
--- a/drivers/power/lp8788-charger.c
+++ b/drivers/power/lp8788-charger.c
@@ -600,13 +600,13 @@ static void lp8788_setup_adc_channel(const char *consumer_name,
struct iio_channel *chan;
enum lp8788_adc_id id;
const char *chan_name[LPADC_MAX] = {
- [LPADC_VBATT_5P5] = "vbatt-5p5",
- [LPADC_VBATT_6P0] = "vbatt-6p0",
- [LPADC_VBATT_5P0] = "vbatt-5p0",
- [LPADC_ADC1] = "adc1",
- [LPADC_ADC2] = "adc2",
- [LPADC_ADC3] = "adc3",
- [LPADC_ADC4] = "adc4",
+ [LPADC_VBATT_5P5] = "lp8788_vbatt_5p5",
+ [LPADC_VBATT_6P0] = "lp8788_vbatt_6p0",
+ [LPADC_VBATT_5P0] = "lp8788_vbatt_5p0",
+ [LPADC_ADC1] = "lp8788_adc1",
+ [LPADC_ADC2] = "lp8788_adc2",
+ [LPADC_ADC3] = "lp8788_adc3",
+ [LPADC_ADC4] = "lp8788_adc4",
};
if (!pdata)
--
1.7.9.5
Best Regards,
Milo
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 2/3] lp8788-charger: fix ADC channel names
2012-10-18 6:11 [PATCH 2/3] lp8788-charger: fix ADC channel names Kim, Milo
@ 2012-10-19 15:41 ` Jonathan Cameron
2012-10-22 0:23 ` Kim, Milo
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cameron @ 2012-10-19 15:41 UTC (permalink / raw)
To: Kim, Milo; +Cc: cbou, Anton Vorontsov, Lars-Peter Clausen, linux-kernel
On 10/18/2012 07:11 AM, Kim, Milo wrote:
> LP8788 IIO ADC driver and platform data have specific naming convention
> for ADC channels. That is using prefix 'lp8788_'.
> To keep this rule, ADC channel names are changed.
>
It's a little unusual to name the consumer side of the map so specifically.
If you want to do so it's up to you though (and it obviously has to match)
that provided in platform_data including the default map in the iio driver.
> Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
> ---
> drivers/power/lp8788-charger.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/power/lp8788-charger.c b/drivers/power/lp8788-charger.c
> index 614e6aa..02fc9ab 100644
> --- a/drivers/power/lp8788-charger.c
> +++ b/drivers/power/lp8788-charger.c
> @@ -600,13 +600,13 @@ static void lp8788_setup_adc_channel(const char *consumer_name,
> struct iio_channel *chan;
> enum lp8788_adc_id id;
> const char *chan_name[LPADC_MAX] = {
> - [LPADC_VBATT_5P5] = "vbatt-5p5",
> - [LPADC_VBATT_6P0] = "vbatt-6p0",
> - [LPADC_VBATT_5P0] = "vbatt-5p0",
> - [LPADC_ADC1] = "adc1",
> - [LPADC_ADC2] = "adc2",
> - [LPADC_ADC3] = "adc3",
> - [LPADC_ADC4] = "adc4",
> + [LPADC_VBATT_5P5] = "lp8788_vbatt_5p5",
> + [LPADC_VBATT_6P0] = "lp8788_vbatt_6p0",
> + [LPADC_VBATT_5P0] = "lp8788_vbatt_5p0",
> + [LPADC_ADC1] = "lp8788_adc1",
> + [LPADC_ADC2] = "lp8788_adc2",
> + [LPADC_ADC3] = "lp8788_adc3",
> + [LPADC_ADC4] = "lp8788_adc4",
> };
>
> if (!pdata)
>
^ permalink raw reply [flat|nested] 3+ messages in thread* RE: [PATCH 2/3] lp8788-charger: fix ADC channel names
2012-10-19 15:41 ` Jonathan Cameron
@ 2012-10-22 0:23 ` Kim, Milo
0 siblings, 0 replies; 3+ messages in thread
From: Kim, Milo @ 2012-10-22 0:23 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: cbou, Anton Vorontsov, Lars-Peter Clausen, linux-kernel
> > LP8788 IIO ADC driver and platform data have specific naming
> convention
> > for ADC channels. That is using prefix 'lp8788_'.
> > To keep this rule, ADC channel names are changed.
> >
> It's a little unusual to name the consumer side of the map so
> specifically.
> If you want to do so it's up to you though (and it obviously has to
> match)
> that provided in platform_data including the default map in the iio
> driver.
Thanks a lot for your review.
You're right. A channel name is configurable data in the platform side,
so the fixed patch has been sent as below.
[PATCH v2 2/3] lp8788-charger: fix ADC channel names
Best Regards,
Milo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-22 0:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-18 6:11 [PATCH 2/3] lp8788-charger: fix ADC channel names Kim, Milo
2012-10-19 15:41 ` Jonathan Cameron
2012-10-22 0:23 ` Kim, Milo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome