Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2094093pxk; Sat, 26 Sep 2020 17:00:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYQtCdI5qPU/AKFVvr4yzc0mfKzAePUVqjuU41Lf4KNOsX42I5C5RMK0wZ3SVUffIVN8zs X-Received: by 2002:aa7:d4d2:: with SMTP id t18mr8475527edr.55.1601164835702; Sat, 26 Sep 2020 17:00:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601164835; cv=none; d=google.com; s=arc-20160816; b=vm0GUl0L+ju4gEZn749S5R9yRG6C/iCGt+yv8A3hZEODcGNjTy7NouClcMJYJeehAL y+m6y74QocC++Fieq4oHrKZpHgOXsNE8fvR9PunjvvNrb5xp4waxdB0ZRi+nHPcYtxk1 /1DoVWqIim+qkno8OyG10ZxTUe4GFJjySnXKwhq1wQXjecxCqK8P4rhJaiv51XrG+jeQ VZ0Eus3WzIXsvoMncq3OF8BLCeQsVDxh9lVnibZ2tLecGihUSiALK++FzBnzBtKKcgUJ rudYVgT8qpvbzOyeORZJR3rR/+qrInf+AxQ06+zJm3I9im9yamTaPoNKsPrptOMG/8Oz 4MsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :subject:from:references:in-reply-to:message-id:date:dkim-signature; bh=jBGuXvZGWwhNarlI2WmWY0E+M/DkvDsEBK3fKR6Lga0=; b=k1HDbGlqBLBw8GgCX4OaGaUEEUDy85V24wGvToxCTvRwVQpsamToB1eoVJPHeilZwN cpPtwFlRfbFbFqAl9oe5T55wEdnEtrqKNAD7kMC/3buceqZ9GLrSAlBam7dVeULz+YKk I3+oOy0aLLItONUvbs0Uhbku/1RrrUuF2tpu1hc8fju0K2Z5bpzcIRoalVMZCgIdATiM +BB4TG/eZ2WbZQn1PTtf7kxMXOQCbgDMjgtcxZ+iQU+/c4+UqqnDhqD6F9Q5fn+dhglg c6E7QmWPYqh9nlOcaxWt3rSLtfZJwgWu8EMbWkvb9h52HBm1IJmeiXkvNNaf6HQuGQF/ eOcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=NhkYopv9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s13si5218720edj.323.2020.09.26.17.00.12; Sat, 26 Sep 2020 17:00:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=NhkYopv9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728580AbgIZX7S (ORCPT + 99 others); Sat, 26 Sep 2020 19:59:18 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:4772 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727982AbgIZX7S (ORCPT ); Sat, 26 Sep 2020 19:59:18 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4BzQjv4blbzC4; Sun, 27 Sep 2020 01:59:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1601164755; bh=dgb3fryIR/h82S0ZIMI7wbAYSPc3yco4sMhX5KqPpwc=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=NhkYopv9ND1jdmR/tAcCd4KO+bSuyrvpcIiGUGGwMwO1ZrWLFNd/eSmYjX4PHb7hG sX19Gg3RjLv7CqRNEeRSzaJZs2zxoFpx6n+edFEF3ZrRpyeQRbJ65YQaQ0OK9rOGEQ awllVz1yJTs//yRQ+/hvV5T+13l+ruxgdkPKk51qn2aotC60HAS3rZNBfPlXkU4u2S ToHg4fsoebmpjDjTvrBSAIfLAQ5mbpFv9iWVQDqTFrZyPVnfu0RXMiRNxj7iSa9fIv u43kcgxGEAEtl3O4zEeHdmEhuKEdDl0diel4JYNwue3FuwQCr91iOTZZuEIlbD7Kj2 WaVSTDoPC8S0w== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.4 at mail Date: Sun, 27 Sep 2020 01:59:15 +0200 Message-Id: In-Reply-To: References: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH 1/5] gpio: tps65910: use regmap accessors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To: Linus Walleij , Bartosz Golaszewski , Lee Jones , Liam Girdwood , Mark Brown , Tony Lindgren Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use regmap accessors directly for register manipulation - removing one layer of abstraction. Signed-off-by: Michał Mirosław --- 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