From patchwork Tue Sep 27 22:32:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 12991437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B080DC07E9D for ; Tue, 27 Sep 2022 22:33:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=wYCJHEkuF4C5AOdgA2nmmj9LJkCVXupSSgAiyp9OZlw=; b=dP8FG52FXYRwTE megGDelBidfAHmORqzseZ7k2wzTDdq+WImsFidb3iyf7nlEdZZ0rGcQqf4LeA11oQbbWSuV+hmUm3 3czPjG4Xruk1wY/+isVJpewRvBFKGHGwAtLmanad2aGeLg1q8WQxvOs+/1dGr5GSw5pFzMpVFh3GT M1FaizYG18G4dVKVWH0Ww+VzC9vH4ubPdHJKGToawxzD21fihDQdW9ElSXg28v3zfoKc9/8OLSb5Q UdUJWtCHOyKiVl3oq+RFP2JBcSJJaaaOCArRuKHc4h4u+nH/gqfjWaKtLMqYK49cVfk9MwioNyXBn Z8EoTcwyfvNShAn7Q1Ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1odJ8A-00CwGe-HB; Tue, 27 Sep 2022 22:32:46 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1odJ84-00CwBz-Qy for linux-arm-kernel@lists.infradead.org; Tue, 27 Sep 2022 22:32:43 +0000 Received: by mail-pj1-x1031.google.com with SMTP id h8-20020a17090a054800b00205ccbae31eso78931pjf.5 for ; Tue, 27 Sep 2022 15:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date; bh=OD3lRvHWHynetpK03lKY+/32dF/WZQ/VUdDZ7v9K1aU=; b=qHLAts6EtKsbT1NsEoXQ+C6PXpkur/IifdB2C1dP2lvlMXrdmTJvj+9BfrMmfuz2X/ JP+PUUsNNL5DWrBiqsYOEL2Ti/JQQR4qjYD0WleD/sCWgswPigU5aWdOBXS/miMdU3GP +APoP5q5fFdSP+aEYBLQaQVwauYWDB+I5p5BIpJemozBvyZVYtDRgiAJ0m2nrgI6XoeF rnxC4MP6hZoevbHVASu3X4+S9z6rS8IBPff16fY08Wi2+ZJVpQg3mbvlE6S8LUdaAX2D RfpHJVVZXZhOuxKT38m3MtHfgrzbZMk32LPqjSLn1IvqKOtAJPRYP1ofI8l9wEaz7TeC Tegg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date; bh=OD3lRvHWHynetpK03lKY+/32dF/WZQ/VUdDZ7v9K1aU=; b=suCAkt2VHilobcj/zdVTtvJr+d7OJPskT7Mz1/csDoP8zwMPYy0NRy0z+Vag31daVE TtbPHru+RxhbNWeR3W8mZO7nuw5yMNCHQXgngpyktpCg6lZlV3bCV7WOPlqCxckJT1fj 7zGCa2voNMZx+G9nRPiNF8GKD3HTEENr/81fkeqSoPQcJRkCIYOY0FsYAkg0/TS8qdK5 hqF1YnT8J8HtViKzWlSK6sQ78Yu4yaVT+mIkuYvg8PFiCxRZWTx5NBCliSkNiHfmLWWw O2MzzPbeG2dkW+YM0P/6/kpEvM8mbJwrHP7gWmTZsxp8eFuQT8lGf/NAgCjRD++pZJww 6abg== X-Gm-Message-State: ACrzQf3+/jBg4mDhno2PuaPvF8fuKUre6kIwrYLzXxNFdoixdQ7cIF1J Gh6IiWzEbLlDKj6+z+at4Nk= X-Google-Smtp-Source: AMsMyM5uGsQ8+A2UIJ1XijHFjRn43rd3Ae+Rg1wRk+/9JNpz6h4yl9fgE3o29ceHx+6KMiTaNPHtpw== X-Received: by 2002:a17:90b:1b4c:b0:202:c05f:6e7b with SMTP id nv12-20020a17090b1b4c00b00202c05f6e7bmr6807078pjb.200.1664317958845; Tue, 27 Sep 2022 15:32:38 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:9739:ab49:3830:2cbb]) by smtp.gmail.com with ESMTPSA id n17-20020a170902d2d100b00176a47e5840sm2090195plc.298.2022.09.27.15.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 15:32:38 -0700 (PDT) Date: Tue, 27 Sep 2022 15:32:35 -0700 From: Dmitry Torokhov To: Krzysztof Kozlowski , Rob Herring , Lee Jones , Daniel Thompson , Jingoo Han Cc: Shawn Guo , Sascha Hauer , Fabio Estevam , NXP Linux Team , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [RFC/PATCH] backlight: hx8357: prepare to conversion to gpiod API Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220927_153241_935559_E4D85CD7 X-CRM114-Status: GOOD ( 15.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Properties describing GPIOs should be named as "-gpios" or "-gpio", and that is what gpiod API expects, however the driver uses non-standard "gpios-reset" name. Let's adjust this, and also note that the reset line is active low as that is also important to gpiod API. Signed-off-by: Dmitry Torokhov --- Another option is to add another quirk into gpiolib-of.c, but we may end up with a ton of them once we convert everything away from of_get_named_gpio() to gpiod API, so I'd prefer not doing that. arch/arm/boot/dts/imx28-cfa10049.dts | 7 +++++-- arch/arm/boot/dts/imx28-cfa10055.dts | 3 ++- arch/arm/boot/dts/imx28-cfa10056.dts | 3 ++- drivers/video/backlight/hx8357.c | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/imx28-cfa10049.dts b/arch/arm/boot/dts/imx28-cfa10049.dts index 9ef0d567ea48..ae51a2aa2028 100644 --- a/arch/arm/boot/dts/imx28-cfa10049.dts +++ b/arch/arm/boot/dts/imx28-cfa10049.dts @@ -3,6 +3,7 @@ * Copyright 2012 Free Electrons */ +#include /* * The CFA-10049 is an expansion board for the CFA-10036 module, thus we * need to include the CFA-10036 DTS. @@ -346,8 +347,10 @@ hx8357: hx8357@0 { spi-max-frequency = <100000>; spi-cpol; spi-cpha; - gpios-reset = <&gpio3 30 0>; - im-gpios = <&gpio5 4 0 &gpio5 5 0 &gpio5 6 0>; + reset-gpios = <&gpio3 30 GPIO_ACTIVE_LOW>; + im-gpios = <&gpio5 4 GPIO_ACTIVE_HIGH + &gpio5 5 GPIO_ACTIVE_HIGH + &gpio5 6 GPIO_ACTIVE_HIGH>; }; }; diff --git a/arch/arm/boot/dts/imx28-cfa10055.dts b/arch/arm/boot/dts/imx28-cfa10055.dts index fac5bbda7a93..70e4dc67f7d2 100644 --- a/arch/arm/boot/dts/imx28-cfa10055.dts +++ b/arch/arm/boot/dts/imx28-cfa10055.dts @@ -4,6 +4,7 @@ * Free Electrons */ +#include /* * The CFA-10055 is an expansion board for the CFA-10036 module and * CFA-10037, thus we need to include the CFA-10037 DTS. @@ -148,7 +149,7 @@ hx8357: hx8357@0 { spi-max-frequency = <100000>; spi-cpol; spi-cpha; - gpios-reset = <&gpio3 30 0>; + reset-gpios = <&gpio3 30 GPIO_ACTIVE_LOW>; }; }; diff --git a/arch/arm/boot/dts/imx28-cfa10056.dts b/arch/arm/boot/dts/imx28-cfa10056.dts index c5f3337e8b39..687eaa555a15 100644 --- a/arch/arm/boot/dts/imx28-cfa10056.dts +++ b/arch/arm/boot/dts/imx28-cfa10056.dts @@ -3,6 +3,7 @@ * Copyright 2013 Free Electrons */ +#include /* * The CFA-10055 is an expansion board for the CFA-10036 module and * CFA-10037, thus we need to include the CFA-10037 DTS. @@ -107,7 +108,7 @@ hx8369: hx8369@0 { spi-max-frequency = <100000>; spi-cpol; spi-cpha; - gpios-reset = <&gpio3 30 0>; + reset-gpios = <&gpio3 30 GPIO_ACTIVE_LOW>; }; }; }; diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c index 9b50bc96e00f..41332f48b2df 100644 --- a/drivers/video/backlight/hx8357.c +++ b/drivers/video/backlight/hx8357.c @@ -601,7 +601,7 @@ static int hx8357_probe(struct spi_device *spi) if (!match || !match->data) return -EINVAL; - lcd->reset = of_get_named_gpio(spi->dev.of_node, "gpios-reset", 0); + lcd->reset = of_get_named_gpio(spi->dev.of_node, "reset-gpios", 0); if (!gpio_is_valid(lcd->reset)) { dev_err(&spi->dev, "Missing dt property: gpios-reset\n"); return -EINVAL;