All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Bard Liao <bardliao@realtek.com>, Mark Brown <broonie@kernel.org>
Cc: Oder Chiou <oder_chiou@realtek.com>,
	John Lin <john.lin@realtek.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"zhengxing@rock-chips.com" <zhengxing@rock-chips.com>,
	"yang.a.fang@intel.com" <yang.a.fang@intel.com>,
	"koro.chen@mediatek.com" <koro.chen@mediatek.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"Leilk.Liu@mediatek.com" <Leilk.Liu@mediatek.com>,
	Flove <flove@realtek.com>
Subject: Re: [PATCH v2 1/2] ASoC: rt5645: change gpio to gpiod APIs
Date: Wed, 03 Jun 2015 14:08:01 +0200	[thread overview]
Message-ID: <556EEE21.9040507@metafoo.de> (raw)
In-Reply-To: <ABFD875FF5FB574BA706497D987D48D70107135C@RTITMBSV03.realtek.com.tw>

On 06/03/2015 02:03 PM, Bard Liao wrote:
>> -----Original Message-----
>> From: Mark Brown [mailto:broonie@kernel.org]
>> Sent: Wednesday, June 03, 2015 1:17 AM
>> To: Lars-Peter Clausen
>> Cc: Bard Liao; lgirdwood@gmail.com; Oder Chiou;
>> alsa-devel@alsa-project.org; zhengxing@rock-chips.com;
>> yang.a.fang@intel.com; koro.chen@mediatek.com; John Lin;
>> Leilk.Liu@mediatek.com; Flove
>> Subject: Re: [alsa-devel] [PATCH v2 1/2] ASoC: rt5645: change gpio to
>> gpiod APIs
>>
>> On Fri, May 29, 2015 at 06:31:08PM +0200, Lars-Peter Clausen wrote:
>>
>>> Three things, don't use the _index API if there is only a single gpio
>>> for the property, either don't use a name at all or use a descriptive
>>> name something like "hp-detect" and use the new version of the API
>>> which has the flags parameter.
>>
>>> So this should be: devm_gpiod_get(&i2c->dev, NULL, GPIOD_IN);
>>
>>> and then drop the gpiod_direction_input()...
>>
>> It seems better if people use names where possible if there's any chance
>> that we could add support for other GPIOs in the future, that avoids
>> confusion further down the line with extension.
>
> Do you mean use a well-described gpio name such as "hp-detect" so that
> we can use another name if we need to add other gpios in the future?

Yes, kind of. The name of the GPIO should be its function. Having a GPIO 
with the name rt5645 on a rt5645 does not really describe anything since we 
already know that it is a rt5645.

  reply	other threads:[~2015-06-03 12:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29 10:16 [PATCH v2 1/2] ASoC: rt5645: change gpio to gpiod APIs Bard Liao
2015-05-29 10:16 ` [PATCH v2 2/2] ASoC: rt5645: add device tree support Bard Liao
2015-05-29 16:31   ` Lars-Peter Clausen
2015-05-29 14:23 ` [PATCH v2 1/2] ASoC: rt5645: change gpio to gpiod APIs Michele Curti
2015-05-29 16:31 ` Lars-Peter Clausen
2015-06-02 17:16   ` Mark Brown
2015-06-03 12:03     ` Bard Liao
2015-06-03 12:08       ` Lars-Peter Clausen [this message]
2015-06-03 12:13       ` Mark Brown

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=556EEE21.9040507@metafoo.de \
    --to=lars@metafoo.de \
    --cc=Leilk.Liu@mediatek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=flove@realtek.com \
    --cc=john.lin@realtek.com \
    --cc=koro.chen@mediatek.com \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.com \
    --cc=yang.a.fang@intel.com \
    --cc=zhengxing@rock-chips.com \
    /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.