From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755992AbbLQCem (ORCPT ); Wed, 16 Dec 2015 21:34:42 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:35516 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753610AbbLQCej convert rfc822-to-8bit (ORCPT ); Wed, 16 Dec 2015 21:34:39 -0500 X-AuditID: cbfee68d-f79646d000001355-41-56721f3cfdc7 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8BIT Message-id: <56721F31.5060608@samsung.com> Date: Thu, 17 Dec 2015 11:34:25 +0900 From: Chanwoo Choi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Sergei Shtylyov , robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, myungjoo.ham@samsung.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linux-sh@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH v3] extcon: add Maxim MAX3355 driver References: <2473780.4IzuWX8hE2@wasted.cogentembedded.com> <56721AFE.9020103@samsung.com> In-reply-to: <56721AFE.9020103@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOIsWRmVeSWpSXmKPExsWyRsSkQNdGvijMYMtmHYv5R86xWvS/Wchq ce7VSkaLy7vmsFnM+TOF2WLRslZmi6XXLzJZ3G5cwWYxYfpaFovWvUfYLc6susXuwO2xZt4a Ro/Lfb1MHg+m/mfyWLn8C5vHplWdbB59W1YxenzeJBfAHsVlk5Kak1mWWqRvl8CV8fP9K/aC ZWIVf9+sZmxg3C7YxcjJISFgItHy7hEzhC0mceHeerYuRi4OIYEVjBJzFv1jhSl6MKGPGSIx i1Fi6oQbbCAJXgFBiR+T77F0MXJwMAuoS0yZk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Hh6hAhET3iUqQTSICrUwS3RM2MIHUMAuYS8yd +gjMFhawkJjy5SMjxPxoicavl8DinALaEk8fnGWZwAh0I8JxsxCOm4Vw3AJG5lWMEqkFyQXF Sem5Rnmp5XrFibnFpXnpesn5uZsYwengmfQOxsO73A8xCnAwKvHwCuwrDBNiTSwrrsw9xCjB wawkwvt9D1CINyWxsiq1KD++qDQntfgQoynQexOZpUST84GpKq8k3tDYxMzI0sjc0MLI2FxJ nHffpcgwIYH0xJLU7NTUgtQimD4mDk6pBsZeGQbBvBjxD1q2hqt3HDpy8cTaK7KpLUfZb882 nLOk8Gmv6YNDMl86n281DQxgPqT7ibfyu8Qq7eU7Kmbq3Kk8LpMiN0Hq6bZYdgXnMsFt+zW8 cpT/dE1zUWDdHjjb1fVpv/q+ezvaNkx826TDvMFKS43hAIuj9aMWvdMr487fP8QSpLL2uZAS S3FGoqEWc1FxIgBP3EwwHQMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2015년 12월 17일 11:16, Chanwoo Choi wrote: > Hi Sergei, > > On 2015년 12월 17일 03:07, Sergei Shtylyov wrote: >> Maxim Integrated MAX3355E chip integrates a charge pump and comparators to >> enable a system with an integrated USB OTG dual-role transceiver to >> function as an USB OTG dual-role device. In addition to sensing/controlling >> Vbus, the chip also passes thru the ID signal from the USB OTG connector. >> On some Renesas boards, this signal is just fed into the SoC thru a GPIO >> pin -- there's no real OTG controller, only host and gadget USB controllers >> sharing the same USB bus; however, we'd like to allow host or gadget >> drivers to be loaded depending on the cable type, hence the need for the >> MAX3355 extcon driver. The Vbus status signals are also wired to GPIOs >> (however, we aren't currently interested in them), the OFFVBUS# signal is >> controlled by the host controllers, there's also the SHDN# signal wired to >> a GPIO, it should be driven high for the normal operation. >> >> Signed-off-by: Sergei Shtylyov >> >> --- >> Changes in version 3: >> - reformatted the change log. >> >> Changes in version 2: >> - added the USB gadget cable support; >> - added the remove() driver method which drives SHDN# GPIO low to save power; >> - dropped vendor prefix from the ID GPIO property name; >> - changed the GPIO property name suffix to "-gpios"; >> - switched to usign extcon_set_cable_state_() API; >> - switched to using the gpiod/sleeping 'gpiolib' APIs; >> - addded error messages to max3355_probe(); >> - added IRQF_NO_SUSPEND flasg to the devm_request_threaded_irq() call; >> - renamed 'ret' variable to 'err' in max3355_probe(); >> - expanded the Kconfig entry help text; >> - added vendor name to the patch summary, the bindings document, the Kconfig >> entry, the driver heading comment, the module description, and the change log; >> - fixed up and reformatted the change log. >> >> Documentation/devicetree/bindings/extcon/extcon-max3355.txt | 21 + >> drivers/extcon/Kconfig | 8 >> drivers/extcon/Makefile | 1 >> drivers/extcon/extcon-max3355.c | 153 ++++++++++++ >> 4 files changed, 183 insertions(+) >> [snip] >> + return 0; >> +} >> + >> +static int max3355_remove(struct platform_device *pdev) >> +{ >> + struct max3355_data *data = platform_get_drvdata(pdev); >> + >> + gpiod_set_value_cansleep(data->shdn_gpiod, 0); Don't need to handle the 'shdn' gpio on resume/suspend funtcion? But, if the interrput of id gpio is used for wakeup source, there is no reason to handle it for suspend mode. [snip] Thanks, Chanwoo Choi