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 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 13968C4332F for ; Wed, 9 Nov 2022 08:51:50 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5sapa7M3UrryvUGSQwlf175aTuaBbGPE9fX4ioykcSE=; b=kMMpjwNH7SogzF YgEve+Kl278DcBrV8KhDoTWKGgGwyPDm56/+HAmR9GblMDV3u5qkMHoEoCbtXvZiDqR2l4wXaAfSc T0PQw912Alzwsnq08kVhPZbXal95IAYvt6Ixl6nU8qV+A6j1jFvzrpO5Vrn0FONwQr0b8Q4sH+3CX mv53aKQwsQXAo1qWaWmpV0quJhKU+DpcpVyNZ0BHq5cm2tfIZBewwpkUMOGP2IFCSga4jacGGmiIK El3HnRjExSvF/qGim+bwGG5peeVLlMmWLw4ELnpd7dniZzD9ImjCgdbv4NiycdWdE0Mb0Zsp7lKy0 XutY4nGwMT8mmBJV4Msg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1osgnH-00C1F8-99; Wed, 09 Nov 2022 08:50:47 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1osgnC-00C1Cb-QC for linux-arm-kernel@lists.infradead.org; Wed, 09 Nov 2022 08:50:44 +0000 Received: by mail-lf1-x130.google.com with SMTP id bp15so24600914lfb.13 for ; Wed, 09 Nov 2022 00:50:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=J3EQMmOf6u9ACXGswA3bu082sYHDO4D/BwB6U27ApGs=; b=bY+qnc6zdmnPt9ShQMzlKoP2tUnMJdnn8NJL6XXmiNXa+J9gmXZIkmGu8Fluz23FkS /OfkVnrFUn/ukFu8aMtOxNme3UO7/J1Qt/iDksuACh2ntlE1zFVhgglpssGV10eHNWEF zkeFivDMkXQFbjj7Oc1jTXA5kF9qWA+mcOO/EuTPipec9gawuvLCEtr4lH8upq2Ef2VX lFcVhW3kHxVr/gzcjYEWYC/NyQZJAB487JocVB0mCSTD6VvDPBSwFj0WSHOEhkGkrWzj /K3t0ydEnKmye5J2EvXYGeVAvHymb8MgbZRrP+n86J8SHteoH3+dhCv7gKkuLQKHFCam wmLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=J3EQMmOf6u9ACXGswA3bu082sYHDO4D/BwB6U27ApGs=; b=PfILe1HC2+3OlucJ5KgbiXqEfyTKqTfLBTfNEAgwmpZBPbya9SbvPB++MB3LQy3yNm zohbCnl0EW50EBepU5HxA2yqpLeigj56Wo7CRV5aJjv0FgsxoCMJsQmUBYqsfek/kk6t 1pBh0+3MsfYMjS+FzpQOwLwNh1rVcXuHUU2KavWVA6ylTAC9t/4LtT6y6vSfiA6OrTDY yoFmNP4QvX2FRW+qzUMFtd0Eyf9d7pQXXPxHPZ95+vi233bzadeosNVXJOai/4P9V+Kv 4SMLCxbtLTDUQJmc16kr0v2Ox0+5ywfrBFIxC21eAy/adY9w51dc/EclEhff3UWUctuf joGw== X-Gm-Message-State: ACrzQf3+yd8Qgq1bjt5e/dN1IuaeOnjJOHo9nk9K5yYzOFMo904o329+ w4pScKRfM5/QnjuEoGOSkvp35w== X-Google-Smtp-Source: AMsMyM7+cIg5un+3Int5TRgbTckV1Sexrv8P+mYFfomKJUqU+HT6aXsLD7pB4qu9mM0h6gQ9TPKv6A== X-Received: by 2002:a19:ca08:0:b0:4a2:8b07:999c with SMTP id a8-20020a19ca08000000b004a28b07999cmr22298068lfg.455.1667983840252; Wed, 09 Nov 2022 00:50:40 -0800 (PST) Received: from [192.168.0.20] (088156142199.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.199]) by smtp.gmail.com with ESMTPSA id u24-20020a2e9b18000000b0026bf0d71b1esm2043162lji.93.2022.11.09.00.50.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Nov 2022 00:50:39 -0800 (PST) Message-ID: Date: Wed, 9 Nov 2022 09:50:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v3 4/7] gpio: tps6594x: add GPIO support for TPS6594x PMIC Content-Language: en-US To: Matt Ranostay , brgl@bgdev.pl, lee@kernel.org, linus.walleij@linaro.org, kristo@kernel.org, alexandre.belloni@bootlin.com, a.zummo@towertech.it, krzysztof.kozlowski+dt@linaro.org, robh@kernel.org, vigneshr@ti.com Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-rtc@vger.kernel.org, linux-gpio@vger.kernel.org, Keerthy References: <20221109065546.24912-1-mranostay@ti.com> <20221109065546.24912-5-mranostay@ti.com> From: Krzysztof Kozlowski In-Reply-To: <20221109065546.24912-5-mranostay@ti.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221109_005042_890715_39A8A156 X-CRM114-Status: GOOD ( 21.29 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 09/11/2022 07:55, Matt Ranostay wrote: > Add support for TPS6594X PMICs GPIO interface that has 11 that can be > configured as input or outputs. > > Tested-by: Keerthy > Signed-off-by: Matt Ranostay > --- > drivers/gpio/Kconfig | 7 ++ > drivers/gpio/Makefile | 1 + > drivers/gpio/gpio-tps6594x.c | 142 +++++++++++++++++++++++++++++++++++ > include/linux/mfd/tps6594x.h | 6 ++ > 4 files changed, 156 insertions(+) > create mode 100644 drivers/gpio/gpio-tps6594x.c > > diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig > index 8c756cb29214..0225e6bddf0a 100644 > --- a/drivers/gpio/Kconfig > +++ b/drivers/gpio/Kconfig > @@ -1405,6 +1405,13 @@ config GPIO_TPS65912 > help > This driver supports TPS65912 GPIO chip. > > +config GPIO_TPS6594X > + tristate "TI TPS6594X GPIO driver" > + depends on MFD_TPS6594X Maybe || COMPILE_TEST? > + help > + Select this option to enable GPIO driver for the TPS6954X > + PMIC chip family. There are 11 GPIOs that can be configured. > + (...) > + > +static int tps6594x_gpio_probe(struct platform_device *pdev) > +{ > + struct tps6594x *tps = dev_get_drvdata(pdev->dev.parent); > + struct tps6594x_gpio *gpio; > + > + gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); and here you did it correctly... I don't get why your two patches differ. > + if (!gpio) > + return -ENOMEM; > + > + gpio->tps = dev_get_drvdata(pdev->dev.parent); > + gpio->gpio_chip = template_chip; > + gpio->gpio_chip.parent = tps->dev; > + > + return devm_gpiochip_add_data(&pdev->dev, &gpio->gpio_chip, gpio); > +} > + > +static const struct of_device_id of_tps6594x_gpio_match[] = { > + { .compatible = "ti,tps6594x-gpio", }, > + {}, > +}; > +MODULE_DEVICE_TABLE(of, of_tps6594x_gpio_match); > + > +static struct platform_driver tps6594x_gpio_driver = { > + .driver = { > + .name = "tps6594x-gpio", > + .of_match_table = of_match_ptr(of_tps6594x_gpio_match), Drop of_match_ptr(). It comes with maybe_unused, which you do not have here. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel