From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Alexander Aring <alex.aring@gmail.com>
Cc: linux-wpan@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH bluetooth-next] at86rf230: add support for setting external xtal
Date: Mon, 23 Feb 2015 16:54:15 +0100 [thread overview]
Message-ID: <54EB4D27.9000800@pengutronix.de> (raw)
In-Reply-To: <20150223154104.GA15550@omega>
[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]
On 02/23/2015 04:41 PM, Alexander Aring wrote:
> Marc,
>
> On Mon, Feb 23, 2015 at 04:13:29PM +0100, Alexander Aring wrote:
>> On Mon, Feb 23, 2015 at 04:10:58PM +0100, Marc Kleine-Budde wrote:
>>> On 02/23/2015 04:05 PM, Alexander Aring wrote:
>>>> This patch adds support for setting external xtal. This is recommended
> ...
>>>> rc = at86rf230_read_subreg(lp, SR_DVDD_OK, &dvdd);
>>>> if (rc)
>>>> return rc;
>>>> @@ -1392,6 +1403,16 @@ at86rf230_get_pdata(struct spi_device *spi)
>>>> pdata->rstn = of_get_named_gpio(spi->dev.of_node, "reset-gpio", 0);
>>>> pdata->slp_tr = of_get_named_gpio(spi->dev.of_node, "sleep-gpio", 0);
>>>>
>>>> + pdata->xtal = of_property_read_bool(spi->dev.of_node, "external-xtal");
>>>
>>> The platform data should be considered read only by the driver. Better
>>> put the information into your per-driver private data struct.
>>>
>>
>> ah, yes you are completely right here. Sorry :)
>>
>
> I am not sure if this is okay here in that case. For non devicetree this
> code will never touched and I grab this code from some i2c driver like
> [0].
>
> They also use the platform-data for setting the devicetree properties.
That doesn't make it better.
> The only thing which I can see now is the check if (xtal > 0xF) which is
> not available on non devicetree settings... but I can also remove this
> check, somebody should make something complete wrong if this value is
> above 0xF and regmap should mask this value.
IMHO this driver has been poorly converted to DT. The usual way would be
to add data to at86rf230_local.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-02-23 15:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-23 15:05 [PATCH bluetooth-next] at86rf230: add support for setting external xtal Alexander Aring
2015-02-23 15:10 ` Marc Kleine-Budde
2015-02-23 15:13 ` Alexander Aring
2015-02-23 15:41 ` Alexander Aring
2015-02-23 15:54 ` Marc Kleine-Budde [this message]
2015-02-23 16:06 ` Alexander Aring
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=54EB4D27.9000800@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=alex.aring@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-wpan@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