From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Biju Das <biju.das.au@gmail.com>
Subject: Re: [PATCH v3 3/3] pinctrl: mcp23s08: Simplify probe()/mcp23s08_spi_regmap_init()
Date: Mon, 25 Sep 2023 10:52:26 +0300 [thread overview]
Message-ID: <ZRE8Oq4Xpklvism9@smile.fi.intel.com> (raw)
In-Reply-To: <20230924172320.15165-4-biju.das.jz@bp.renesas.com>
On Sun, Sep 24, 2023 at 06:23:20PM +0100, Biju Das wrote:
> Add struct mcp23s08_info and simplify probe()/mcp23s08_spi_regmap_init() by
> replacing match data 'type' with 'struct mcp23s08_info'.
>
> While at it, replace 'dev_err()'->'dev_err_probe()' and drop printing
> 'type' in error path for i2c_get_match_data().
No need to duplicate info in the name of variables (see below).
With this fixed,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
...
> +static const struct mcp23s08_info mcp23s08_i2c_0008 = {
static const struct mcp23s08_info mcp23008_i2c = {
> + .regmap = &mcp23x08_regmap,
> + .label = "mcp23008",
> + .type = MCP_TYPE_008,
> + .ngpio = 8,
> + .reg_shift = 0,
> +};
> +
> +static const struct mcp23s08_info mcp23s08_i2c_0017 = {
static const struct mcp23s08_info mcp23017_i2c = {
> + .regmap = &mcp23x17_regmap,
> + .label = "mcp23017",
> + .type = MCP_TYPE_017,
> + .ngpio = 16,
> + .reg_shift = 1,
> +};
> +
> +static const struct mcp23s08_info mcp23s08_i2c_0018 = {
static const struct mcp23s08_info mcp23018_i2c = {
> + .regmap = &mcp23x17_regmap,
> + .label = "mcp23018",
> + .type = MCP_TYPE_018,
> + .ngpio = 16,
> + .reg_shift = 1,
> +};
...
> +static const struct mcp23s08_info mcp23s08_spi_s08 = {
static const struct mcp23s08_info mcp23s08_spi = {
> + .regmap = &mcp23x08_regmap,
> + .type = MCP_TYPE_S08,
> + .ngpio = 8,
> + .reg_shift = 0,
> +};
> +
> +static const struct mcp23s08_info mcp23s08_spi_s17 = {
static const struct mcp23s08_info mcp23s17_spi = {
> + .regmap = &mcp23x17_regmap,
> + .type = MCP_TYPE_S17,
> + .ngpio = 16,
> + .reg_shift = 1,
> +};
> +
> +static const struct mcp23s08_info mcp23s08_spi_s18 = {
static const struct mcp23s08_info mcp23s18_spi = {
> + .regmap = &mcp23x17_regmap,
> + .label = "mcp23s18",
> + .type = MCP_TYPE_S18,
> + .ngpio = 16,
> + .reg_shift = 1,
> +};
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2023-09-25 7:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-24 17:23 [PATCH v3 0/3] atch data improvements for mcp23s08 driver Biju Das
2023-09-24 17:23 ` [PATCH v3 1/3] pinctrl: mcp23s08_i2c: Extend match support for OF tables Biju Das
2023-09-24 17:23 ` [PATCH v3 2/3] pinctrl: mcp23s08_spi: Simplify probe() Biju Das
2023-09-24 17:23 ` [PATCH v3 3/3] pinctrl: mcp23s08: Simplify probe()/mcp23s08_spi_regmap_init() Biju Das
2023-09-25 7:52 ` Andy Shevchenko [this message]
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=ZRE8Oq4Xpklvism9@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=biju.das.au@gmail.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®