All of lore.kernel.org
 help / color / mirror / Atom feed
From: rishi gupta <gupt21@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Tobias Junghans <tobias.junghans@inhub.de>
Cc: Linux Input <linux-input@vger.kernel.org>,
	Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>
Subject: Re: [PATCH 2/2] HID: mcp2221: configure GP pins for GPIO function
Date: Sun, 19 Sep 2021 16:12:55 +0530	[thread overview]
Message-ID: <CALUj-gvpwhYW8FuTaEjSmgNUhMTizYKvXDxAu6c6SNPbHNdOyg@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdZSmiVPOY8==pAhnUnYUn5xv6Wf5-tKEEJrpcqPF47++w@mail.gmail.com>

Thanks Linus.

Hi Tobias, few observations on code:
1. Copy-paste error; please change set to get in comments for struct
mcp_get_sram_settings.
2. If mcp_configure_gp() fails, we have invalid copy of
mcp->gp_runtime_settings (new value is not set actually but we have
updated this array with new value)..

Regards,
Rishi

On Fri, Sep 17, 2021 at 4:44 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Wed, Aug 18, 2021 at 5:28 PM Tobias Junghans
> <tobias.junghans@inhub.de> wrote:
>
> > Per default the GP pins of an MCP2221 are designated to a certain
> > dedicated or alternate function. While it's possible to change these
> > defaults by manually updating the internal flash, it's much more
> > convenient and safe to configure the GP pins as GPIOs automatically
> > at runtime whenever the corresponding GPIO line is requested. The
> > previous setting is restored as soon as the GPIO line is freed again.
> >
> > Signed-off-by: Tobias Junghans <tobias.junghans@inhub.de>
>
> My sympathies are usually on the side of users trying to make
> use of their hardware and they should be able to.
>
> For other wrong configured GPIO expanders such as FTDI
> a publicly available firmware reflash tool exists, and if that does
> not exist for this hardware, I think this approach is legitimate.
>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
> Yours,
> Linus Walleij

  reply	other threads:[~2021-09-19 10:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 15:27 [PATCH 1/2] HID: mcp2221: enable HID I/O during probe Tobias Junghans
2021-08-18 15:27 ` [PATCH 2/2] HID: mcp2221: configure GP pins for GPIO function Tobias Junghans
     [not found]   ` <CALUj-gtmN70HwzvtsO7rss0LXboFC0h9Dgfakt6UEvC_6FdAwA@mail.gmail.com>
2021-08-20  7:18     ` Tobias Junghans
2021-08-30  9:11       ` rishi gupta
2021-08-30 13:09         ` Tobias Junghans
2021-08-30 13:17           ` rishi gupta
2021-08-30 13:30             ` Tobias Junghans
2021-09-02  7:13               ` rishi gupta
2021-09-16 23:13   ` Linus Walleij
2021-09-19 10:42     ` rishi gupta [this message]
2021-09-24 17:36       ` Jim Posen
2022-04-06 15:54 ` [PATCH 1/2] HID: mcp2221: enable HID I/O during probe rishi gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALUj-gvpwhYW8FuTaEjSmgNUhMTizYKvXDxAu6c6SNPbHNdOyg@mail.gmail.com \
    --to=gupt21@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=tobias.junghans@inhub.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.