From: Sven Van Asbroeck <thesven73@gmail.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Sven Van Asbroeck <svendev@arcx.com>,
Wolfram Sang <wsa@the-dreams.de>,
nsekhar@ti.com, Sakari Ailus <sakari.ailus@linux.intel.com>,
Javier Martinez Canillas <javier@dowhile0.org>,
Divagar Mohandass <divagar.mohandass@intel.com>,
devicetree@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-i2c <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH v1 1/2] eeprom: at24: convert magic numbers to structs.
Date: Fri, 8 Dec 2017 09:17:00 -0500 [thread overview]
Message-ID: <CAGngYiWdnE9Ztu3uGeqAS+Ksag6-W84AORJnWb1Xzc7EMBwZNg@mail.gmail.com> (raw)
In-Reply-To: <CAMRc=MeQUavcxejmTO5G7w2GBBY-7KKQ649qW_GhEZ9bV755nw@mail.gmail.com>
Bartosz wrote:
>> +#define AT24_OF_DEVICE_ID(_mfg, _name) \
>> + { .compatible = #_mfg "," #_name, .data = &platdata_##_name }
>
> I don't like hiding the way the compatible is created here from the
> user. It doesn't save any code neither. Please make the macro accept
> the whole compatible string.
>
If the macro accepts the whole compatible string "mfg,chip-name" (e.g.
"atmel,24c01")
then how can I extract chip-name from that string? I need to attach
chip-name to the
platdata_ static structures. (e.g. "atmel,24c01" -> .data = platdata_24c01)
next prev parent reply other threads:[~2017-12-08 14:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 16:04 [PATCH v1 0/2] eeprom: at24: convert magic numbers to structs Sven Van Asbroeck
2017-12-06 16:04 ` [PATCH v1 1/2] " Sven Van Asbroeck
[not found] ` <1512576272-25563-2-git-send-email-svendev-fuHqz3Nb1YI@public.gmane.org>
2017-12-08 13:32 ` Bartosz Golaszewski
2017-12-08 14:10 ` Sven Van Asbroeck
[not found] ` <CAGngYiXtUBbYocb885CPCaXNM=uckeiHc47FXKghDz_B-WNYrg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-08 15:05 ` Bartosz Golaszewski
2017-12-08 14:17 ` Sven Van Asbroeck [this message]
[not found] ` <CAGngYiWdnE9Ztu3uGeqAS+Ksag6-W84AORJnWb1Xzc7EMBwZNg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-08 15:05 ` Bartosz Golaszewski
2017-12-08 15:28 ` Sven Van Asbroeck
2017-12-08 15:39 ` Peter Rosin
2017-12-08 15:41 ` Sven Van Asbroeck
[not found] ` <CAGngYiWmnBgjufeEUW5LYA8Ci7Rwt2m=FLCDX3RjrdWrxY97aw@mail.gmail.com>
[not found] ` <CAGngYiWmnBgjufeEUW5LYA8Ci7Rwt2m=FLCDX3RjrdWrxY97aw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-08 15:32 ` Bartosz Golaszewski
2017-12-06 16:04 ` [PATCH v1 2/2] eeprom: at24: remove temporary fix for at24mac402 size Sven Van Asbroeck
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=CAGngYiWdnE9Ztu3uGeqAS+Ksag6-W84AORJnWb1Xzc7EMBwZNg@mail.gmail.com \
--to=thesven73@gmail.com \
--cc=brgl@bgdev.pl \
--cc=devicetree@vger.kernel.org \
--cc=divagar.mohandass@intel.com \
--cc=javier@dowhile0.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=sakari.ailus@linux.intel.com \
--cc=svendev@arcx.com \
--cc=wsa@the-dreams.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 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).