Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1299878 > unrolled thread

[PATCH] power_suply: isp1704_charger: Fix isp1704_write() definition

Started byIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
First post2016-01-01 12:10 +0100
Last post2016-01-09 23:50 +0100
Articles 5 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] power_suply: isp1704_charger: Fix isp1704_write() definition Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-01-01 12:10 +0100
    Re: [PATCH] power_suply: isp1704_charger: Fix isp1704_write() definition Pali Rohár <pali.rohar@gmail.com> - 2016-01-01 12:30 +0100
      Re: [PATCH] power_suply: isp1704_charger: Fix isp1704_write()  definition Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> - 2016-01-01 12:40 +0100
        Re: [PATCH] power_suply: isp1704_charger: Fix isp1704_write() definition Pali Rohár <pali.rohar@gmail.com> - 2016-01-02 16:50 +0100
      Re: [PATCH] power_suply: isp1704_charger: Fix isp1704_write() definition Pali Rohár <pali.rohar@gmail.com> - 2016-01-09 23:50 +0100

#1299878 — [PATCH] power_suply: isp1704_charger: Fix isp1704_write() definition

FromIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Date2016-01-01 12:10 +0100
Subject[PATCH] power_suply: isp1704_charger: Fix isp1704_write() definition
Message-ID<qM5KO-1Gt-13@gated-at.bofh.it>
All calls to isp1704_write() are using parameter sequence of
isp1704_write(isp, reg, val) but the function is defined as
isp1704_write(isp, val, reg). Fix isp1704_write function definition so that
the driver to be functional.

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
---
 drivers/power/isp1704_charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/isp1704_charger.c b/drivers/power/isp1704_charger.c
index f2a7d97..46a292a 100644
--- a/drivers/power/isp1704_charger.c
+++ b/drivers/power/isp1704_charger.c
@@ -76,7 +76,7 @@ static inline int isp1704_read(struct isp1704_charger *isp, u32 reg)
 	return usb_phy_io_read(isp->phy, reg);
 }
 
-static inline int isp1704_write(struct isp1704_charger *isp, u32 val, u32 reg)
+static inline int isp1704_write(struct isp1704_charger *isp, u32 reg, u32 val)
 {
 	return usb_phy_io_write(isp->phy, val, reg);
 }
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1299879

FromPali Rohár <pali.rohar@gmail.com>
Date2016-01-01 12:30 +0100
Message-ID<qM649-1Nv-3@gated-at.bofh.it>
In reply to#1299878

[Multipart message — attachments visible in raw view] — view raw

On Friday 01 January 2016 12:03:29 Ivaylo Dimitrov wrote:
> All calls to isp1704_write() are using parameter sequence of
> isp1704_write(isp, reg, val) but the function is defined as
> isp1704_write(isp, val, reg). Fix isp1704_write function definition
> so that the driver to be functional.
> 
> Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>

Reviewed-by: Pali Rohár <pali.rohar@gmail.com>

This problem is there since inclusion of driver itself. No idea why that 
driver could work... I remember that it detected correctly type of 
charger.

I will test this patch on real N900 HW in one or two weeks to check how 
it behave after patching...

-- 
Pali Rohár
pali.rohar@gmail.com

[toc] | [prev] | [next] | [standalone]


#1299880 — Re: [PATCH] power_suply: isp1704_charger: Fix isp1704_write() definition

FromIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Date2016-01-01 12:40 +0100
SubjectRe: [PATCH] power_suply: isp1704_charger: Fix isp1704_write() definition
Message-ID<qM6dP-1R8-3@gated-at.bofh.it>
In reply to#1299879
Hi Pali,

On  1.01.2016 13:26, Pali Rohár wrote:
> On Friday 01 January 2016 12:03:29 Ivaylo Dimitrov wrote:
>> All calls to isp1704_write() are using parameter sequence of
>> isp1704_write(isp, reg, val) but the function is defined as
>> isp1704_write(isp, val, reg). Fix isp1704_write function definition
>> so that the driver to be functional.
>>
>> Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
>
> Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
>
> This problem is there since inclusion of driver itself. No idea why that
> driver could work... I remember that it detected correctly type of
> charger.
>
> I will test this patch on real N900 HW in one or two weeks to check how
> it behave after patching...
>

Well, I  tested in on real HW, wall charger as well as USB were 
correctly detected. No idea what else needs to be tested, but I guess if 
you guide me, I can test whatever is needed.

Ivo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1300089

FromPali Rohár <pali.rohar@gmail.com>
Date2016-01-02 16:50 +0100
Message-ID<qMwBj-1tc-9@gated-at.bofh.it>
In reply to#1299880

[Multipart message — attachments visible in raw view] — view raw

On Friday 01 January 2016 12:33:03 Ivaylo Dimitrov wrote:
> Hi Pali,
> 
> On  1.01.2016 13:26, Pali Rohár wrote:
> > On Friday 01 January 2016 12:03:29 Ivaylo Dimitrov wrote:
> >> All calls to isp1704_write() are using parameter sequence of
> >> isp1704_write(isp, reg, val) but the function is defined as
> >> isp1704_write(isp, val, reg). Fix isp1704_write function
> >> definition so that the driver to be functional.
> >> 
> >> Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
> > 
> > Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
> > 
> > This problem is there since inclusion of driver itself. No idea why
> > that driver could work... I remember that it detected correctly
> > type of charger.
> > 
> > I will test this patch on real N900 HW in one or two weeks to check
> > how it behave after patching...
> 
> Well, I  tested in on real HW, wall charger as well as USB were
> correctly detected. No idea what else needs to be tested, but I guess
> if you guide me, I can test whatever is needed.
> 
> Ivo

I think nothing more is needed to test. But I want to see how driver 
behave with and without this patch.

-- 
Pali Rohár
pali.rohar@gmail.com

[toc] | [prev] | [next] | [standalone]


#1305382

FromPali Rohár <pali.rohar@gmail.com>
Date2016-01-09 23:50 +0100
Message-ID<qPauD-3CC-29@gated-at.bofh.it>
In reply to#1299879

[Multipart message — attachments visible in raw view] — view raw

On Friday 01 January 2016 12:26:21 Pali Rohár wrote:
> On Friday 01 January 2016 12:03:29 Ivaylo Dimitrov wrote:
> > All calls to isp1704_write() are using parameter sequence of
> > isp1704_write(isp, reg, val) but the function is defined as
> > isp1704_write(isp, val, reg). Fix isp1704_write function definition
> > so that the driver to be functional.
> > 
> > Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
> 
> Reviewed-by: Pali Rohár <pali.rohar@gmail.com>
> 
> This problem is there since inclusion of driver itself. No idea why
> that driver could work... I remember that it detected correctly type
> of charger.
> 
> I will test this patch on real N900 HW in one or two weeks to check
> how it behave after patching...

Tested-by: Pali Rohár <pali.rohar@gmail.com>

Please send this patch to all stable kernels.

-- 
Pali Rohár
pali.rohar@gmail.com

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web