linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFT] gpio: ts4800: Fixup flags argument for bgpio_init
@ 2016-02-12  4:16 Axel Lin
  2016-02-12 14:42 ` Julien Grossholtz
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2016-02-12  4:16 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Julien Grossholtz, Alexandre Courbot, linux-gpio

BGPIOF_BIG_ENDIAN & BGPIOF_BIG_ENDIAN_BYTE_ORDER is 0.
Fixup the trivial typo.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Hi Julien,
I don't have this h/w, can you review and test if this patch works.
Thanks,
Axel

 drivers/gpio/gpio-ts4800.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-ts4800.c b/drivers/gpio/gpio-ts4800.c
index c4908a4..c244c31 100644
--- a/drivers/gpio/gpio-ts4800.c
+++ b/drivers/gpio/gpio-ts4800.c
@@ -49,7 +49,7 @@ static int ts4800_gpio_probe(struct platform_device *pdev)
 	retval = bgpio_init(chip, &pdev->dev, 2, base_addr + INPUT_REG_OFFSET,
 			    base_addr + OUTPUT_REG_OFFSET, NULL,
 			    base_addr + DIRECTION_REG_OFFSET, NULL,
-			    BGPIOF_BIG_ENDIAN & BGPIOF_BIG_ENDIAN_BYTE_ORDER);
+			    BGPIOF_BIG_ENDIAN | BGPIOF_BIG_ENDIAN_BYTE_ORDER);
 	if (retval) {
 		dev_err(&pdev->dev, "bgpio_init failed\n");
 		return retval;
-- 
2.1.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH RFT] gpio: ts4800: Fixup flags argument for bgpio_init
  2016-02-12  4:16 [PATCH RFT] gpio: ts4800: Fixup flags argument for bgpio_init Axel Lin
@ 2016-02-12 14:42 ` Julien Grossholtz
  0 siblings, 0 replies; 2+ messages in thread
From: Julien Grossholtz @ 2016-02-12 14:42 UTC (permalink / raw)
  To: Axel Lin; +Cc: Linus Walleij, Alexandre Courbot, linux-gpio

Hi Alex,


----- Original Message -----
> From: "Axel Lin" <axel.lin@ingics.com>
> To: "Linus Walleij" <linus.walleij@linaro.org>
> Cc: "Julien Grossholtz" <julien.grossholtz@savoirfairelinux.com>, "Alexandre Courbot" <gnurou@gmail.com>,
> linux-gpio@vger.kernel.org
> Sent: Thursday, February 11, 2016 11:16:30 PM
> Subject: [PATCH RFT] gpio: ts4800: Fixup flags argument for bgpio_init

> BGPIOF_BIG_ENDIAN & BGPIOF_BIG_ENDIAN_BYTE_ORDER is 0.
> Fixup the trivial typo.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> Hi Julien,
> I don't have this h/w, can you review and test if this patch works.

No, this patch is not working. The big endian flags where a mistake.
Therefore I submitted a patch to remove them:
[PATCH v2] gpio: TS-4800: remove useless bgpio_init flags. 

There is no flag required at all for bgpio_init,
I ran my tests and it worked as expected.

Thank you for proposing a solution.



> Thanks,
> Axel
> 
> drivers/gpio/gpio-ts4800.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpio/gpio-ts4800.c b/drivers/gpio/gpio-ts4800.c
> index c4908a4..c244c31 100644
> --- a/drivers/gpio/gpio-ts4800.c
> +++ b/drivers/gpio/gpio-ts4800.c
> @@ -49,7 +49,7 @@ static int ts4800_gpio_probe(struct platform_device *pdev)
> 	retval = bgpio_init(chip, &pdev->dev, 2, base_addr + INPUT_REG_OFFSET,
> 			    base_addr + OUTPUT_REG_OFFSET, NULL,
> 			    base_addr + DIRECTION_REG_OFFSET, NULL,
> -			    BGPIOF_BIG_ENDIAN & BGPIOF_BIG_ENDIAN_BYTE_ORDER);
> +			    BGPIOF_BIG_ENDIAN | BGPIOF_BIG_ENDIAN_BYTE_ORDER);
> 	if (retval) {
> 		dev_err(&pdev->dev, "bgpio_init failed\n");
> 		return retval;
> --
> 2.1.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-12 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-12  4:16 [PATCH RFT] gpio: ts4800: Fixup flags argument for bgpio_init Axel Lin
2016-02-12 14:42 ` Julien Grossholtz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).