Devicetree
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
To: Phil Reid <preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
Cc: linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	poeschel-Xtl8qvBWbHwb1SvskN2V4Q@public.gmane.org,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 3/7] gpio: mcp23s08: add support for mcp23018
Date: Sun, 8 Oct 2017 23:18:22 +0200	[thread overview]
Message-ID: <20171008211821.vege3ytdu5bnu35p@earth> (raw)
In-Reply-To: <1507266491-73971-4-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2377 bytes --]

Hi,

On Fri, Oct 06, 2017 at 01:08:07PM +0800, Phil Reid wrote:
> This adds the required definitions for the mcp23018 which is the i2c
> variant of the mcp23s18.
> 
> Signed-off-by: Phil Reid <preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
> ---

Reviewed-by: Sebastian Reichel <sebastian.reichel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>

-- Sebastian

>  drivers/pinctrl/pinctrl-mcp23s08.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c
> index 3e40d42..8d356df 100644
> --- a/drivers/pinctrl/pinctrl-mcp23s08.c
> +++ b/drivers/pinctrl/pinctrl-mcp23s08.c
> @@ -25,6 +25,7 @@
>  #define MCP_TYPE_008	2
>  #define MCP_TYPE_017	3
>  #define MCP_TYPE_S18    4
> +#define MCP_TYPE_018    5
>  
>  #define MCP_MAX_DEV_PER_CS	8
>  
> @@ -837,6 +838,13 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
>  		mcp->chip.ngpio = 16;
>  		mcp->chip.label = "mcp23017";
>  		break;
> +
> +	case MCP_TYPE_018:
> +		mcp->regmap = devm_regmap_init_i2c(data, &mcp23x17_regmap);
> +		mcp->reg_shift = 1;
> +		mcp->chip.ngpio = 16;
> +		mcp->chip.label = "mcp23018";
> +		break;
>  #endif /* CONFIG_I2C */
>  
>  	default:
> @@ -883,7 +891,7 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
>  		if (mirror)
>  			status |= IOCON_MIRROR | (IOCON_MIRROR << 8);
>  
> -		if (type == MCP_TYPE_S18)
> +		if (type == MCP_TYPE_S18 || type == MCP_TYPE_018)
>  			status |= IOCON_INTCC | (IOCON_INTCC << 8);
>  
>  		ret = mcp_write(mcp, MCP_IOCON, status);
> @@ -964,6 +972,10 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
>  		.compatible = "microchip,mcp23017",
>  		.data = (void *) MCP_TYPE_017,
>  	},
> +	{
> +		.compatible = "microchip,mcp23018",
> +		.data = (void *) MCP_TYPE_018,
> +	},
>  /* NOTE: The use of the mcp prefix is deprecated and will be removed. */
>  	{
>  		.compatible = "mcp,mcp23008",
> @@ -1013,6 +1025,7 @@ static int mcp230xx_probe(struct i2c_client *client,
>  static const struct i2c_device_id mcp230xx_id[] = {
>  	{ "mcp23008", MCP_TYPE_008 },
>  	{ "mcp23017", MCP_TYPE_017 },
> +	{ "mcp23018", MCP_TYPE_018 },
>  	{ },
>  };
>  MODULE_DEVICE_TABLE(i2c, mcp230xx_id);
> -- 
> 1.8.3.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2017-10-08 21:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06  5:08 [PATCH v2 0/7] pinctrl: mcp32s08: add support for mcp23018 Phil Reid
2017-10-06  5:08 ` [PATCH v2 4/7] dt-bindings: pinctrl: mcp23s08: add documentation for irq-open-drain Phil Reid
2017-10-08 21:15   ` Sebastian Reichel
     [not found]   ` <1507266491-73971-5-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-10-11  8:15     ` Linus Walleij
     [not found] ` <1507266491-73971-1-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-10-06  5:08   ` [PATCH v2 1/7] pinctrl: change Kconfig PINCTRL variable to a menuconfig Phil Reid
     [not found]     ` <1507266491-73971-2-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-10-08 21:24       ` Sebastian Reichel
2017-10-11  7:58     ` Linus Walleij
2017-10-06  5:08   ` [PATCH v2 2/7] dt-bindings: pinctrl: add mcp23018 to mcp23s08 documentation Phil Reid
     [not found]     ` <1507266491-73971-3-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-10-08 21:18       ` Sebastian Reichel
2017-10-11  8:04       ` Linus Walleij
2017-10-06  5:08   ` [PATCH v2 3/7] gpio: mcp23s08: add support for mcp23018 Phil Reid
     [not found]     ` <1507266491-73971-4-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-10-08 21:18       ` Sebastian Reichel [this message]
2017-10-19  7:00         ` Phil Reid
     [not found]           ` <b749e94a-94e4-0087-aea2-99183b25b5ef-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-10-19  8:24             ` Linus Walleij
2017-10-06  5:08   ` [PATCH v2 5/7] pinctrl: mcp23s08: add open drain configuration for irq pinctrl Phil Reid
2017-10-08 21:16     ` Sebastian Reichel
     [not found]     ` <1507266491-73971-6-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-10-11  8:16       ` Linus Walleij
2017-10-06  5:08   ` [PATCH v2 6/7] pinctrl: mcp23s08: remove hardcoded irq polarity in irq_setup Phil Reid
2017-10-08 21:14     ` Sebastian Reichel
     [not found]     ` <1507266491-73971-7-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-10-11  8:17       ` Linus Walleij
2017-10-12  9:04       ` Linus Walleij
     [not found]         ` <CACRpkdaWNthg5OU3ZiSKjPe59cJF5A6jucQ=3bQdz3uAsJ=3dQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-12 14:27           ` Phil Reid
2017-10-06  5:08   ` [PATCH v2 7/7] pinctrl: mcp23s08: remove unused variables from pinconf_set Phil Reid
2017-10-08 21:12     ` Sebastian Reichel
     [not found]     ` <1507266491-73971-8-git-send-email-preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org>
2017-10-11  8:19       ` Linus Walleij

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=20171008211821.vege3ytdu5bnu35p@earth \
    --to=sebastian.reichel-zgy8ohtn/8ppycu2f3hruq@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=poeschel-Xtl8qvBWbHwb1SvskN2V4Q@public.gmane.org \
    --cc=preid-qgqNFa1JUf/o2iN0hyhwsIdd74u8MsAO@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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