linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Lee Jones <lee.jones@linaro.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Tony Lindgren <tony@atomide.com>,
	linux-gpio <linux-gpio@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux-OMAP <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 1/5] gpio: tps65910: use regmap accessors
Date: Mon, 28 Sep 2020 12:19:21 +0200	[thread overview]
Message-ID: <CAMpxmJV5A3OkNNmVcc0AZ+gHo_G2h2D7QrNjc=vKH-6O4mOYhw@mail.gmail.com> (raw)
In-Reply-To: <e3a3979657babf716e5f4072e373637ce86ad7ff.1601164493.git.mirq-linux@rere.qmqm.pl>

On Sun, Sep 27, 2020 at 1:59 AM Michał Mirosław <mirq-linux@rere.qmqm.pl> wrote:
>
> Use regmap accessors directly for register manipulation - removing one
> layer of abstraction.
>
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> ---
>  drivers/gpio/gpio-tps65910.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpio/gpio-tps65910.c b/drivers/gpio/gpio-tps65910.c
> index 0c785b0fd161..0c0b445c75c0 100644
> --- a/drivers/gpio/gpio-tps65910.c
> +++ b/drivers/gpio/gpio-tps65910.c
> @@ -28,7 +28,7 @@ static int tps65910_gpio_get(struct gpio_chip *gc, unsigned offset)
>         struct tps65910 *tps65910 = tps65910_gpio->tps65910;
>         unsigned int val;
>
> -       tps65910_reg_read(tps65910, TPS65910_GPIO0 + offset, &val);
> +       regmap_read(tps65910->regmap, TPS65910_GPIO0 + offset, &val);
>
>         if (val & GPIO_STS_MASK)
>                 return 1;
> @@ -43,10 +43,10 @@ static void tps65910_gpio_set(struct gpio_chip *gc, unsigned offset,
>         struct tps65910 *tps65910 = tps65910_gpio->tps65910;
>
>         if (value)
> -               tps65910_reg_set_bits(tps65910, TPS65910_GPIO0 + offset,
> +               regmap_set_bits(tps65910->regmap, TPS65910_GPIO0 + offset,
>                                                 GPIO_SET_MASK);
>         else
> -               tps65910_reg_clear_bits(tps65910, TPS65910_GPIO0 + offset,
> +               regmap_clear_bits(tps65910->regmap, TPS65910_GPIO0 + offset,
>                                                 GPIO_SET_MASK);
>  }
>
> @@ -59,7 +59,7 @@ static int tps65910_gpio_output(struct gpio_chip *gc, unsigned offset,
>         /* Set the initial value */
>         tps65910_gpio_set(gc, offset, value);
>
> -       return tps65910_reg_set_bits(tps65910, TPS65910_GPIO0 + offset,
> +       return regmap_set_bits(tps65910->regmap, TPS65910_GPIO0 + offset,
>                                                 GPIO_CFG_MASK);
>  }
>
> @@ -68,7 +68,7 @@ static int tps65910_gpio_input(struct gpio_chip *gc, unsigned offset)
>         struct tps65910_gpio *tps65910_gpio = gpiochip_get_data(gc);
>         struct tps65910 *tps65910 = tps65910_gpio->tps65910;
>
> -       return tps65910_reg_clear_bits(tps65910, TPS65910_GPIO0 + offset,
> +       return regmap_clear_bits(tps65910->regmap, TPS65910_GPIO0 + offset,
>                                                 GPIO_CFG_MASK);
>  }
>
> @@ -157,7 +157,7 @@ static int tps65910_gpio_probe(struct platform_device *pdev)
>                 if (!pdata->en_gpio_sleep[i])
>                         continue;
>
> -               ret = tps65910_reg_set_bits(tps65910,
> +               ret = regmap_set_bits(tps65910->regmap,
>                         TPS65910_GPIO0 + i, GPIO_SLEEP_MASK);
>                 if (ret < 0)
>                         dev_warn(tps65910->dev,
> --
> 2.20.1
>

Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

  reply	other threads:[~2020-09-28 10:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-26 23:59 [PATCH 0/5] tps65910: cleanup regmap use Michał Mirosław
2020-09-26 23:59 ` [PATCH 2/5] regulator: tps65910: use regmap accessors Michał Mirosław
2020-09-26 23:59 ` [PATCH 1/5] gpio: " Michał Mirosław
2020-09-28 10:19   ` Bartosz Golaszewski [this message]
2020-09-30  8:44   ` Linus Walleij
2020-10-01  9:01     ` Lee Jones
2020-11-04 14:43       ` Lee Jones
2020-11-05  1:47         ` Michał Mirosław
2020-11-05  1:50           ` linux-next: build failure after merge of the mfd tree Stephen Rothwell
2020-11-05  1:57             ` Michał Mirosław
2020-11-05  9:09               ` Lee Jones
2020-11-05  8:13           ` [PATCH 1/5] gpio: tps65910: use regmap accessors Lee Jones
2020-11-10 13:37             ` Linus Walleij
2020-11-05  7:56   ` Linus Walleij
2020-11-10 13:48   ` Lee Jones
2020-09-26 23:59 ` [PATCH 3/5] mfd: tps65911-comparator: " Michał Mirosław
2020-11-04 14:44   ` Lee Jones
2020-09-26 23:59 ` [PATCH 4/5] mfd: tps65910: clean up after switching to regmap Michał Mirosław
2020-11-04 14:45   ` Lee Jones
2020-09-26 23:59 ` [PATCH 5/5] mfd: tps65910: remove unused pointers Michał Mirosław

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='CAMpxmJV5A3OkNNmVcc0AZ+gHo_G2h2D7QrNjc=vKH-6O4mOYhw@mail.gmail.com' \
    --to=bgolaszewski@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=tony@atomide.com \
    --subject='Re: [PATCH 1/5] gpio: tps65910: use regmap accessors' \
    /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

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).