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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A2F7C07E9D for ; Sat, 24 Sep 2022 11:42:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233493AbiIXLmo (ORCPT ); Sat, 24 Sep 2022 07:42:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229714AbiIXLml (ORCPT ); Sat, 24 Sep 2022 07:42:41 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 325F9115F51 for ; Sat, 24 Sep 2022 04:42:39 -0700 (PDT) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id D3E42FF806; Sat, 24 Sep 2022 11:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1664019758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RhYx+mUA0owcFn9yFdKn4/95n9UVkSvpbtcV0Fc5BEQ=; b=ORM8Ah0Wk8YvxiPWmQ67Zgevs6PsbkhxocFmGXa9gFNChy+qxKkAm4Y3DHeO5fbjybX2Bc CEtqG5MCisUs/PqXlvy/6Pb/NTedx6X/8Q/COZkHGzfeVpoEDj/ZDtAASUXGsch2iSes29 JNLdmMRrf6bil/SNDL7dMpR7sBUXrwUWyitwRV6pIyITC95ycuZzyFeClkHVmiK268aW8b xIYK2Kw7d4K9c1gQZZJvKUmKWg2E6jb26sJ1naauD4+9M9wzV8LpsreCOowlu/nDuBBK8M AEGcxCDCdflycUNwbm8Ch4l7NBRJ+pigXV9SbazZW4Gt3hspHAmvGyT5qEN6rg== Date: Sat, 24 Sep 2022 13:42:37 +0200 From: Alexandre Belloni To: Arnd Bergmann Cc: Dmitry Torokhov , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea Subject: Re: [PATCH] pcmcia: at91_cf: switch to using gpiod API Message-ID: References: <68c63077-848b-45f5-8aca-ed995391f2b6@www.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <68c63077-848b-45f5-8aca-ed995391f2b6@www.fastmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/09/2022 10:33:29+0200, Arnd Bergmann wrote: > On Sat, Sep 24, 2022, at 8:04 AM, Dmitry Torokhov wrote: > > This patch switches the driver to use newer gpiod API instead of legacy > > gpio API. This moves us closer to the goal of stopping exporting > > OF-specific APIs of gpiolib. > > > > While at it, stop using module-global for regmap. > > > > Signed-off-by: Dmitry Torokhov > > This looks good to me overall. Three comments: > > > @@ -63,7 +62,7 @@ struct at91_cf_socket { > > > > static inline int at91_cf_present(struct at91_cf_socket *cf) > > { > > - return !gpio_get_value(cf->board->det_pin); > > + return gpiod_get_value(cf->board->det_pin); > > } > > a) The change in polarity looks wrong here, I can't really tell > from the patch. If this is intentional, maybe explain it in > the changelog. With that addressed (either way) > > Reviewed-by: Arnd Bergmann > > > b) In case you are doing more patches like this one at the moment, > note that I'm in the process of removing all unused board files > for arch/arm/, which will in turn make a lot of drivers unused. > I should be able to provide a branch soon, which can be used to > identify drivers that don't have DT support any more and don't > have any board files. Rather than converting them to gpio > descriptors, we can probably just remove those drivers. > > c) I'm not sure about the state of the at91_cf driver. Apparently > we used to have three drivers for the same hardware (pcmcia, > pata and ide), and only the pcmcia driver remained in the tree > after drivers/ide/ was removed and pata_at91 did not get converted > to DT. I think in the long run we will remove the pcmcia layer, > so if you are actually trying to use this hardware, we may want to > revive the pata variant and drop this one instead. > There is no dts file in tree that actually declares either of them, > so chances are that nobody is actually using the CF slot on at91 > any more. > I'm pretty sure it is broken since eaa9a21dd14b ("pcmcia: at91_cf: Use syscon to configure the MC/smc") as this change has never been tested. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com 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 32EF3C32771 for ; Sat, 24 Sep 2022 11:44:29 +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:MIME-Version:References: 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: List-Owner; bh=YSVxO0dEjDewxACeTaGqY29Reb51KtvpOmcl2zY+gKU=; b=rEyjOdqGEGWMqm nJvhr33N3juW1JyvU7qpQkhupn0H00s9v86fH3jtSNFiGd1q/LxxmKGO87cjj0OCxvICPiTgnpgAp xMAjOZm77tBG2t2mC03a1jM98gQA197ycPFOMbHdORQ2saVqh/Yilj5R/8Zql0/qYjkO4hqBIPC0D FGjsQA+bQPZdq7TYdtuDvkOwpZvUYxkOKqEPOJHtmtHiwFrpsGRMENi7ETf74xW4jbORSwjs5Aasb UIieeIrj7oZf0+ixX2KxYoGuxdNJUHaH80/JUKvaCd7J0x8BdCb32kAgqzqCpdvpArWjYx8iATQcQ wU5Pl9nHfO+E+O31F9iw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oc3YW-0070NF-Ml; Sat, 24 Sep 2022 11:42:48 +0000 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oc3YS-0070Lm-Rc for linux-arm-kernel@lists.infradead.org; Sat, 24 Sep 2022 11:42:47 +0000 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id D3E42FF806; Sat, 24 Sep 2022 11:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1664019758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RhYx+mUA0owcFn9yFdKn4/95n9UVkSvpbtcV0Fc5BEQ=; b=ORM8Ah0Wk8YvxiPWmQ67Zgevs6PsbkhxocFmGXa9gFNChy+qxKkAm4Y3DHeO5fbjybX2Bc CEtqG5MCisUs/PqXlvy/6Pb/NTedx6X/8Q/COZkHGzfeVpoEDj/ZDtAASUXGsch2iSes29 JNLdmMRrf6bil/SNDL7dMpR7sBUXrwUWyitwRV6pIyITC95ycuZzyFeClkHVmiK268aW8b xIYK2Kw7d4K9c1gQZZJvKUmKWg2E6jb26sJ1naauD4+9M9wzV8LpsreCOowlu/nDuBBK8M AEGcxCDCdflycUNwbm8Ch4l7NBRJ+pigXV9SbazZW4Gt3hspHAmvGyT5qEN6rg== Date: Sat, 24 Sep 2022 13:42:37 +0200 From: Alexandre Belloni To: Arnd Bergmann Cc: Dmitry Torokhov , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea Subject: Re: [PATCH] pcmcia: at91_cf: switch to using gpiod API Message-ID: References: <68c63077-848b-45f5-8aca-ed995391f2b6@www.fastmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <68c63077-848b-45f5-8aca-ed995391f2b6@www.fastmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220924_044245_087395_36E7B615 X-CRM114-Status: GOOD ( 31.57 ) 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 24/09/2022 10:33:29+0200, Arnd Bergmann wrote: > On Sat, Sep 24, 2022, at 8:04 AM, Dmitry Torokhov wrote: > > This patch switches the driver to use newer gpiod API instead of legacy > > gpio API. This moves us closer to the goal of stopping exporting > > OF-specific APIs of gpiolib. > > > > While at it, stop using module-global for regmap. > > > > Signed-off-by: Dmitry Torokhov > > This looks good to me overall. Three comments: > > > @@ -63,7 +62,7 @@ struct at91_cf_socket { > > > > static inline int at91_cf_present(struct at91_cf_socket *cf) > > { > > - return !gpio_get_value(cf->board->det_pin); > > + return gpiod_get_value(cf->board->det_pin); > > } > > a) The change in polarity looks wrong here, I can't really tell > from the patch. If this is intentional, maybe explain it in > the changelog. With that addressed (either way) > > Reviewed-by: Arnd Bergmann > > > b) In case you are doing more patches like this one at the moment, > note that I'm in the process of removing all unused board files > for arch/arm/, which will in turn make a lot of drivers unused. > I should be able to provide a branch soon, which can be used to > identify drivers that don't have DT support any more and don't > have any board files. Rather than converting them to gpio > descriptors, we can probably just remove those drivers. > > c) I'm not sure about the state of the at91_cf driver. Apparently > we used to have three drivers for the same hardware (pcmcia, > pata and ide), and only the pcmcia driver remained in the tree > after drivers/ide/ was removed and pata_at91 did not get converted > to DT. I think in the long run we will remove the pcmcia layer, > so if you are actually trying to use this hardware, we may want to > revive the pata variant and drop this one instead. > There is no dts file in tree that actually declares either of them, > so chances are that nobody is actually using the CF slot on at91 > any more. > I'm pretty sure it is broken since eaa9a21dd14b ("pcmcia: at91_cf: Use syscon to configure the MC/smc") as this change has never been tested. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel