public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@zonque.org>
To: Dan Murphy <dmurphy@ti.com>, linux-sound@vger.kernel.org
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	broonie@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [alsa-devel] [PATCH v3] ASoC: tas2552: Support TI TAS2552 Amplifier
Date: Wed, 02 Jul 2014 18:04:15 +0200	[thread overview]
Message-ID: <53B42D7F.60002@zonque.org> (raw)
In-Reply-To: <53B41F0E.90107@ti.com>

On 07/02/2014 05:02 PM, Dan Murphy wrote:
> On 07/02/2014 08:47 AM, Daniel Mack wrote:
>> Hi Dan,
>>
>> On 07/02/2014 03:30 PM, Dan Murphy wrote:
>>> +	if (np) {
>>> +		data->power_gpio = of_get_named_gpio(np, "enable-gpio", 0);
>>> +	} else if (pdata) {
>>> +		data->power_gpio = pdata->enable_gpio;
>>> +	} else {
>>> +		dev_err(dev, "Platform or dev tree data not set\n");
>>> +		return -ENODEV;
>>> +	}
>> New code for GPIO handling should use the new gpiod interface.
>> See include/linux/gpio/consumer.h, or the sta350 codec driver.
> 
> OK good catch.  I will look into it.
> 
> Does the gpiod interface handle both pdata as well as dt?

Yes, please refer to Documentation/gpio/board.txt.

>> For that to work, you also need to rename the property to
>> 'enable-gpios', even though there's only one.
> 
> I am looking for that restriction in the code.  But don't see it.
> Will dig some more here.

Ah, dd34c37aa3 ("gpio: of: Allow -gpio suffix for property names")
changed that, so both variants are now supported.



Daniel



  reply	other threads:[~2014-07-02 16:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-02 13:30 [PATCH v3] ASoC: tas2552: Support TI TAS2552 Amplifier Dan Murphy
2014-07-02 13:47 ` [alsa-devel] " Daniel Mack
2014-07-02 15:02   ` Dan Murphy
2014-07-02 16:04     ` Daniel Mack [this message]
2014-07-02 14:10 ` Felipe Balbi
2014-07-02 14:53   ` Dan Murphy
2014-07-02 15:03     ` Felipe Balbi
2014-07-02 15:30       ` Dan Murphy
2014-07-02 15:43         ` Felipe Balbi
2014-07-02 15:58           ` Dan Murphy

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=53B42D7F.60002@zonque.org \
    --to=daniel@zonque.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.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