diff mbox

power_suply: isp1704_charger: Fix isp1704_write() definition

Message ID 1451646209-11618-1-git-send-email-ivo.g.dimitrov.75@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ivaylo Dimitrov Jan. 1, 2016, 11:03 a.m. UTC
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(-)

Comments

Pali Rohár Jan. 1, 2016, 11:26 a.m. UTC | #1
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...
Ivaylo Dimitrov Jan. 1, 2016, 11:33 a.m. UTC | #2
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-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pali Rohár Jan. 2, 2016, 3:48 p.m. UTC | #3
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 Jan. 9, 2016, 10:42 p.m. UTC | #4
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 May 19, 2016, 9:13 a.m. UTC | #5
On Saturday 09 January 2016 23:42:30 Pali Rohár wrote:
> 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.

Hi! I still think that this patch should go to stable kernels. Because
without it driver does not work... Will somebody send it to stable?
Pali Rohár May 24, 2016, 3:32 p.m. UTC | #6
On Thursday 19 May 2016 11:13:04 Pali Rohár wrote:
> On Saturday 09 January 2016 23:42:30 Pali Rohár wrote:
> > 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.
> 
> Hi! I still think that this patch should go to stable kernels. Because
> without it driver does not work... Will somebody send it to stable?

So no objections, I sent it to stable@vger.kernel.org.
diff mbox

Patch

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);
 }