From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1825C2D0A8 for ; Mon, 28 Sep 2020 10:19:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 86E5821775 for ; Mon, 28 Sep 2020 10:19:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="MuZN73SU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726615AbgI1KTe (ORCPT ); Mon, 28 Sep 2020 06:19:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726552AbgI1KTd (ORCPT ); Mon, 28 Sep 2020 06:19:33 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97C2EC061755 for ; Mon, 28 Sep 2020 03:19:33 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id i1so703297edv.2 for ; Mon, 28 Sep 2020 03:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=HHY2LitkeyuKE1ueF79fzsqA8gZGVBNl2y26Vi+0G7w=; b=MuZN73SUJay7gOjonPYwPI9p88HhEJpd6OklwrVJ1WYR7Pwg3gZE9S2iLwX2jUn0Yl Ga2nhyy5CwTRuHevkTvvHwNuyZi7wBsh40p2iGbl0DfXPqVCAYev2seVzzj8i2Tqo0FJ PB6kNQTqSXaZ9/GNQaYIRVmskHf3QQMm10kq36d6zAQuj8sHQwABeC75MDxRU7DxBCL1 PzbUYgSsIIwwTxmUp53/gz9dv7IAueiHR3deSivi95hhVzOO8KCEwKM+Sh+ObJWT0v5c nfujMuHzcNTbNlTq4My3xZlXs3Y/HovWFpB8JCZoqk3S3Fagu5Fd+z1gj0omwF5q5oKD 0blg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=HHY2LitkeyuKE1ueF79fzsqA8gZGVBNl2y26Vi+0G7w=; b=UaO2IUDVt83QVxaPexuPiw9NlF/PhhtPhg1Vi9PryFbt2MGnPIyBlwHC521T00XKN6 aD+ozk0BGb2Ni6VP3E/wZPkk6k/MkEyi3xmgmxH4lnmdlhSCR6tVfHnWACrCcpdK34iu SSNkenMoy9pjh4oUxrTSjJeHx6KlJovr/JYsQ66THGh3Kb3aLJHeyXZ9xLaeF9h7SPPk 4V0oc/SX68/LtuRylGLvtnnzrKOSZE9DutOQWmIObaJAvGIf03C8TksboBlF/ONWhC/w Hg1TRZNsoWzMpvDQErVIJ8LDV3E+FUUVKhFcBYrJ+CheinajDiD3LoQeQ+WVE1Do8+0c DhcA== X-Gm-Message-State: AOAM531Xjc+K76ohqy2umwA9iF+n6WDwJsZXKgs0TvW94YChY3B1vgKE M0UbkExdfNS/hI2c72cF+xrp/ChoQOvKHz3Poez3qQKjEsg= X-Google-Smtp-Source: ABdhPJz0fRfokckEsdMIHPWlQ+ZJ7Z2nVZUNqonyr5ezT7aGO4E5eOLmu124oJDJaz4YmyI3V+UIpB2m5eBGqhyy0lU= X-Received: by 2002:a05:6402:78b:: with SMTP id d11mr882112edy.341.1601288372214; Mon, 28 Sep 2020 03:19:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bartosz Golaszewski Date: Mon, 28 Sep 2020 12:19:21 +0200 Message-ID: Subject: Re: [PATCH 1/5] gpio: tps65910: use regmap accessors To: =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: Linus Walleij , Lee Jones , Liam Girdwood , Mark Brown , Tony Lindgren , linux-gpio , LKML , Linux-OMAP Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 27, 2020 at 1:59 AM Micha=C5=82 Miros=C5=82aw wrote: > > Use regmap accessors directly for register manipulation - removing one > layer of abstraction. > > Signed-off-by: Micha=C5=82 Miros=C5=82aw > --- > 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, unsi= gned offset) > struct tps65910 *tps65910 =3D 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, u= nsigned offset, > struct tps65910 *tps65910 =3D 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 + offs= et, > GPIO_SET_MASK); > } > > @@ -59,7 +59,7 @@ static int tps65910_gpio_output(struct gpio_chip *gc, u= nsigned 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, un= signed offset) > struct tps65910_gpio *tps65910_gpio =3D gpiochip_get_data(gc); > struct tps65910 *tps65910 =3D tps65910_gpio->tps65910; > > - return tps65910_reg_clear_bits(tps65910, TPS65910_GPIO0 + offset, > + return regmap_clear_bits(tps65910->regmap, TPS65910_GPIO0 + offse= t, > GPIO_CFG_MASK); > } > > @@ -157,7 +157,7 @@ static int tps65910_gpio_probe(struct platform_device= *pdev) > if (!pdata->en_gpio_sleep[i]) > continue; > > - ret =3D tps65910_reg_set_bits(tps65910, > + ret =3D 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