From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939737AbdAJTLy (ORCPT ); Tue, 10 Jan 2017 14:11:54 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35542 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764585AbdAJTK0 (ORCPT ); Tue, 10 Jan 2017 14:10:26 -0500 Subject: Re: [PATCH] gpio: pca953x: Add optional reset gpio control To: Andy Shevchenko , Vladimir Zapolskiy References: <1483391271-17304-1-git-send-email-steve_longerbeam@mentor.com> <1483391271-17304-2-git-send-email-steve_longerbeam@mentor.com> <7bfce806-7670-0bf3-bdf2-00aaf68b5b11@mentor.com> Cc: Linus Walleij , Alexandre Courbot , Rob Herring , Mark Rutland , "linux-gpio@vger.kernel.org" , devicetree , "linux-kernel@vger.kernel.org" , Steve Longerbeam From: Steve Longerbeam Message-ID: <84d21f6d-7d6b-dd05-98a1-739c1e4d8d58@gmail.com> Date: Tue, 10 Jan 2017 11:10:23 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/04/2017 02:31 AM, Andy Shevchenko wrote: > >>>> + reset_gpio = devm_gpiod_get_optional(&client->dev, "reset", >>>> + GPIOD_OUT_LOW); >>> Shouldn't be _optional_exclusive? >>> See this recent discussion https://patchwork.ozlabs.org/patch/706002/ >> There is no devm_gpiod_get_optional_exclusive(), probably you confuse >> the function with devm_reset_control_get_optional_exclusive(). > Perhaps it's time to add > drivers/reset/reset-gpio.c ? Yeah, looks like a GPIO based reset controller driver would need to be implemented in order to go this route. The max7310 nodes in imx6qdl-sabreauto.dtsi could then refer to that reset controller by the 'resets' phandle. There are many many devices that would benefit from a GPIO reset controller, I count 143 nodes under arch/arm/boot/dts that specify a 'reset-gpios' property. But I don't have the time to write such a driver. So I would propose just keeping the devm_gpiod_get_optional() call here. When such a gpio reset controller is written, the work can begin to convert all the gpio reset users to make use of it. Steve