linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff LaBundy <jeff@labundy.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: robh+dt@kernel.org, linux-input@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v2 8/9] Input: iqs5xx - make reset GPIO optional
Date: Mon, 22 Mar 2021 10:42:21 -0500	[thread overview]
Message-ID: <20210322154221.GA3215@labundy.com> (raw)
In-Reply-To: <YFgX37ody0bHwv10@google.com>

Hi Dmitry,

On Sun, Mar 21, 2021 at 09:06:55PM -0700, Dmitry Torokhov wrote:
> Hi Jeff,
> 
> On Sat, Mar 13, 2021 at 01:12:35PM -0600, Jeff LaBundy wrote:
> > @@ -989,7 +993,11 @@ static int iqs5xx_probe(struct i2c_client *client,
> >  		return error;
> >  	}
> > 
> > -	error = devm_device_add_group(&client->dev, &iqs5xx_attr_group);
> > +	if (iqs5xx->reset_gpio &&
> > +	    iqs5xx->dev_id_info.bl_status != IQS5XX_BL_STATUS_NONE)
> > +		attr_group = &iqs5xx_attr_group_bl;
> 
> I would prefer if we defined is_visible for the attribute instead of
> conditional registration.

Thank you for pointing me to that option; it's much cleaner and I'll
send a v3 with an is_visible callback.

> 
> > +
> > +	error = devm_device_add_group(&client->dev, attr_group);
> >  	if (error) {
> >  		dev_err(&client->dev, "Failed to add attributes: %d\n", error);
> >  		return error;
> > --
> > 2.17.1
> > 
> 
> Thanks.
> 
> -- 
> Dmitry

Kind regards,
Jeff LaBundy

  reply	other threads:[~2021-03-22 15:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-13 19:12 [PATCH v2 0/9] Input: iqs5xx - more enhancements and optimizations Jeff LaBundy
2021-03-13 19:12 ` [PATCH v2 1/9] Input: iqs5xx - update vendor's URL Jeff LaBundy
2021-03-22  4:00   ` Dmitry Torokhov
2021-03-13 19:12 ` [PATCH v2 2/9] Input: iqs5xx - optimize axis definition and validation Jeff LaBundy
2021-03-22  4:02   ` Dmitry Torokhov
2021-03-13 19:12 ` [PATCH v2 3/9] Input: iqs5xx - expose firmware revision to user space Jeff LaBundy
2021-03-22  4:02   ` Dmitry Torokhov
2021-03-13 19:12 ` [PATCH v2 4/9] Input: iqs5xx - remove superfluous revision validation Jeff LaBundy
2021-03-22  4:03   ` Dmitry Torokhov
2021-03-13 19:12 ` [PATCH v2 5/9] Input: iqs5xx - close bootloader using hardware reset Jeff LaBundy
2021-03-22  4:04   ` Dmitry Torokhov
2021-03-13 19:12 ` [PATCH v2 6/9] Input: iqs5xx - prevent interrupt storm during removal Jeff LaBundy
2021-03-14  6:21   ` Dmitry Torokhov
2021-03-15  3:38     ` Jeff LaBundy
2021-03-13 19:12 ` [PATCH v2 7/9] Input: iqs5xx - suspend or resume regardless of users Jeff LaBundy
2021-03-13 19:12 ` [PATCH v2 8/9] Input: iqs5xx - make reset GPIO optional Jeff LaBundy
2021-03-22  4:06   ` Dmitry Torokhov
2021-03-22 15:42     ` Jeff LaBundy [this message]
2021-03-13 19:12 ` [PATCH v2 9/9] dt-bindings: input: iqs5xx: Convert to YAML Jeff LaBundy

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=20210322154221.GA3215@labundy.com \
    --to=jeff@labundy.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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 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).