Received: by 10.192.165.156 with SMTP id m28csp474892imm; Thu, 19 Apr 2018 02:14:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/+nMfV0T5ErIyMpuCyw/v9M9sNdrZY89xUc5i3EvmsrW92NBl9yhEelh/vWcmrntl27QEC X-Received: by 10.98.15.195 with SMTP id 64mr5062475pfp.63.1524129250412; Thu, 19 Apr 2018 02:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524129250; cv=none; d=google.com; s=arc-20160816; b=o5LXp2d2txS+M1lXecRCovUBmiQoWuP1EXBIwzIeYCSoqMERIQrtS2gAOQrGHpQJRn pMGAJW5gZ2J9q+CVTLQNIhJs8cYkrNkhNPNKtJ3uv5QI45vDVg/BukBgS4pIqhndBEye 2s5AhNHhI78B0/GgTuTtqe4QlNxMgXGHhAdFmxkVX6rdwDdh1226XHvRDA61NSCY1NRP 6iZoLQS2C6ChAzKvGUDxGjsAB3OYLUUmOBBn8cicwopgUixwruZgCPdL5Mknt7LqWPDM PtW7Iu0scmiswknYCvClIRcO+THI6DBS5u8uNBVuDoGnPVzbCZP5duZMYl1Gmvwl72EN wYBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:reply-to:dkim-signature :arc-authentication-results; bh=13IAEnkbJSqQ/lGKIk0UJYeo6qtygEvsrvy/+FSqxNY=; b=xprVeJ+H7GOYcdpM7N6lMxbdVmbXqqpQ0c+SqMn66q19DZRY6IwmdgPOiVb3r5s+td wGB2CunSuDpBg67SWVst41kBz5lN3Gn2R6DICL2s3DF/o1JX9MKegCGIaKaphocam93D G52dQGs0mwcUMOBGtwPFmqd5hExy5Ua6HmkH/KRuIJFNcV4VFZFASTA0pAcHjKc+UNgm ibEuzdMB7z4FWnTcjo6SNnHU0uxUP6qFTuMvaTW7FvyNYhIG4UIcX6uwOwIJA+z4NQdG XQRNCzNvzJ5UQwr07QqxjJdcnMV7iv2VIM4P7aIBY+4wtmJUrKgk18zgZoi2U7Nwbq+x bsXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@analog.onmicrosoft.com header.s=selector1-analog-com header.b=p2fMPswE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l12-v6si3138829plt.336.2018.04.19.02.13.56; Thu, 19 Apr 2018 02:14:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@analog.onmicrosoft.com header.s=selector1-analog-com header.b=p2fMPswE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752325AbeDSJLi (ORCPT + 99 others); Thu, 19 Apr 2018 05:11:38 -0400 Received: from mail-bn3nam01on0041.outbound.protection.outlook.com ([104.47.33.41]:31360 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751325AbeDSJLf (ORCPT ); Thu, 19 Apr 2018 05:11:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.onmicrosoft.com; s=selector1-analog-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=13IAEnkbJSqQ/lGKIk0UJYeo6qtygEvsrvy/+FSqxNY=; b=p2fMPswEeXac8bn7sh5OgEoW0WnQi+1yb2PUnw86GECICYD/6kQNsfc9cvkvxe7CRX9ps4WjV/lpeLI4chayoguhOcOjWpgU2VvMhG+Yctovy6ZXkE9LIrAFvksZ/Y6s3JR32G8LFUBw98h1KqKDIkjUfn12OFRLgOAZq8GoC9U= Received: from BLUPR0301CA0019.namprd03.prod.outlook.com (2a01:111:e400:5259::29) by DM5PR03MB3050.namprd03.prod.outlook.com (2603:10b6:3:11e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.13; Thu, 19 Apr 2018 09:11:33 +0000 Received: from BL2FFO11FD023.protection.gbl (2a01:111:f400:7c09::172) by BLUPR0301CA0019.outlook.office365.com (2a01:111:e400:5259::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.696.12 via Frontend Transport; Thu, 19 Apr 2018 09:11:32 +0000 Received-SPF: Pass (protection.outlook.com: domain of analog.com designates 137.71.25.55 as permitted sender) receiver=protection.outlook.com; client-ip=137.71.25.55; helo=nwd2mta1.analog.com; Received: from nwd2mta1.analog.com (137.71.25.55) by BL2FFO11FD023.mail.protection.outlook.com (10.173.161.102) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.653.14 via Frontend Transport; Thu, 19 Apr 2018 09:11:32 +0000 Received: from NWD2HUBCAS7.ad.analog.com (nwd2hubcas7.ad.analog.com [10.64.69.107]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id w3J9BWGO019599 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 19 Apr 2018 02:11:32 -0700 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS7.ad.analog.com (10.64.69.107) with Microsoft SMTP Server id 14.3.301.0; Thu, 19 Apr 2018 05:11:33 -0400 Received: from [10.44.3.40] ([10.44.3.40]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id w3J9BTON019838; Thu, 19 Apr 2018 05:11:30 -0400 Reply-To: Subject: Re: [PATCH v2 09/14] staging: iio: ad7746: Add remove() To: =?UTF-8?Q?Hern=c3=a1n_Gonzalez?= , "Jonathan Cameron" CC: , , Peter Meerwald-Stadler , , , References: <1523637411-8531-1-git-send-email-hernan@vanguardiasur.com.ar> <1523637411-8531-10-git-send-email-hernan@vanguardiasur.com.ar> <20180415163101.6ab15cbc@archlinux> From: Michael Hennerich Organization: Analog Devices Inc. Message-ID: <636ebba6-8597-eb84-6321-11a01cc2862b@analog.com> Date: Thu, 19 Apr 2018 11:14:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:137.71.25.55;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(346002)(39380400002)(39860400002)(376002)(396003)(2980300002)(438002)(189003)(199004)(43066004)(53546011)(4326008)(6246003)(2486003)(36916002)(2870700001)(76176011)(106002)(8666007)(59450400001)(23676004)(2906002)(3450700001)(31686004)(47776003)(65806001)(65956001)(6346003)(77096007)(26005)(186003)(72206003)(478600001)(11346002)(2616005)(476003)(126002)(446003)(486006)(7636002)(106466001)(426003)(5660300001)(44832011)(65826007)(64126003)(8676002)(6666003)(356003)(336012)(110136005)(8936002)(229853002)(36756003)(54906003)(58126008)(67846002)(316002)(305945005)(86362001)(31696002)(93886005)(50466002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR03MB3050;H:nwd2mta1.analog.com;FPR:;SPF:Pass;LANG:en;MLV:ovrnspm;MX:1;A:1;PTR:nwd2mail10.analog.com; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD023;1:6HOrdNyNQpQ1Vb+dARi98AIhEepBObphfNd67SftF+BV5osmNyWxmbereQAA1FqsKNj+N5Vm4cewIwcocSdcaatZ2MNVExVRLqYKGPwL3Igbqe9TuEZ6g7hX3mxwqYer X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4608076)(2017052603328)(7153060);SRVR:DM5PR03MB3050; X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB3050;3:FNQZRcsYfo+SjK4fawokRA2gotCQTd6fxKCWez3Om+q7fMCJIAONO+Glujx5HZfhGtkStpCQuwSnFsgu+ct20AW5gRAsd4AHiN1dG8Hwz2iX7CKhwT6RffSK6Nt9+ot0rPvlcPwMLs7HvJk2+9Wkh3p1fEA6augBlXrhiRY/6qbvBLUPGUIqZHVojtOkWW4Ff++wD3WQV8LaW+PxVuzY6MfWqKt0CBw0j9Gle71dEjfR224fQS54iVxQ7szANTlARYNq5uo4HWMKQKAs1A0D7PY8UsXQ3EvkEOEhAHO1wiSOe3f7sG/BJRAKNS1X5piQ3D80V7/2TH1D2LIvsoMsoYyEPd76+xsrKn8wNlt4Fqk=;25:U4lc94WFQA5+rvTXUSmSIyQL9tzex71gNw2JBi4VYJgoY6jBqIp//L4q201GjNHCgZvvuymPSn2boAAoJZPuglYRjOLsXViJyQNmtwNx/P9iSTDhEosZjGEDw07GKo2lV92fguzkWItyIO0f8kJpxczwZzFp8lknucUosado13kUuRzeaMmcEFmIdbYxi5Y//l1w1WzqP3wDTh/ywuS87QqfVsvWIFVci79wz6B6segTUNjnHQbkhcnFaJ7dZQuq17NApPp37aLPqN4ZkKfJ3h5oB4rLt4a5K3onxzpdS2y9VLrgV6vagrjVrmYRpGriCOEUP7/hH3TmiavsDELE1A== X-MS-TrafficTypeDiagnostic: DM5PR03MB3050: X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB3050;31:6KTW3arLt1b6irTRChcm6pOTW1ZY8K8GkKN9t8oiVumCxPzW6vLFUTErREsUNKKL9Abzc74Ct1nGwRhvYhW8GV0fqytZ1AEN0S191iW8KzdLxnAp9WWtHb0ozgsKZWhCm5lV0sfjw0nD+N3EWblcmXdQ8ko3H8U1aeBcuS//FhRyJQMHPucNnQ+jhk+JXDly0T0QXcxO2wlAUwYsHV+h3pEyNJtBqL4GyVET+5HoJRE=;20:ATEIf63iSFmTUxIlwhk2/3/yxlKjlWcZluUoSD6icOteLVDwckeFAdlqCMEmMRoWAK+kDFA2GK4mEwAQIqznAEKLgDyVtVVV+ARp2/X+uqhGHsLkU4th0iK1YLJhQY+plhXIO4YgpEetn837SDyRw2AH5CAng0EI0QhmQYs/IrlvWFLhVKAVqZktHRfpiM1Ca/ZJSuJETrlWKeuNexvwzw1gueeZh+/KXp7eiiynhS2qwRahhia5W06BsA8tVgNme2gPKHp8qTSJv3uGRb0o+0Qi2lRTy9sz8xCP10lDj8bL8veixlmPMDTLD0HTuN8nTdWo+jRKhoXkt731ETps/70NreE95uVpKaT9c4zDUfUQciQYdcPvVZMNR8DXf7c7gvDNqyNzQhToUFMG7EDu1p6mMrQzD6+f4qejiD2P4dcPQSNirr1+8WmElVciwRbG78+NLANC2jJ6I1qQJt72kMb3sBwP7C8PFtQmXyUazIr7jqyAyUKMZktEcT6JM08Q X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93004095)(3231232)(944501382)(52105095)(3002001)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR03MB3050;BCL:0;PCL:0;RULEID:;SRVR:DM5PR03MB3050; X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB3050;4:y62aulDM7dDXK3bBps2k28n8qEhsBS7dItuCOIWm2w2Uaee+HF/hKGlS5BkH+FI0uyIw+vPhcH87GFo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uk9aFOTx4S75mBp/F02/72VU/hs/kOLNDqBseg==;5:mKHOx+whUIvEBcFmYf/gEMss4B/ZWehaTo7+wLyBAr/u+8lQ410MRhuH24p1jjccMQhgZwQzOx3RvGN6dO9QREcOq9E9cs7Kf3gSCmAd8VhRc/mRht+QnxBylOfAyFfjWYErHdr5SQngIQI8LHyRL/21naV/l/WT8EI2L1XrQwQ=;24:ArE2J74OktHMDwIQ5KidCwsGlaQWShMUS3Dd3/A198eCKZtMb/zvwBx5Jirru+LERlEYUtdCT4tSjHma9RNf4ynNbvxfnzOXQd4zg4mtntQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB3050;7:E9YZhycRrUHdIXCAbYw5Smqc60+pNuU+8TeDhhviyNhgRx6oDc3Al3zydabxT8gW9uC8HdAWVZSpgm33Y33WP2kMmcyDh1zfT/taBRLuE2zV3p6hS/zQbkZ7XIhlnL+2shWukoAuDx202UEp7XDEN7grZRfaXVDOMKkiEY3dYqitwLPDO9dlPNPvRCArPLMFINXCEDqvm8eaCoy8R0uxzYrysQVLFDsQkN1Ux3Zsed5Alfv0YWHmXfpV+La7mByS X-MS-Office365-Filtering-Correlation-Id: 998afc44-b348-4b8d-981b-08d5a5d58b74 X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2018 09:11:32.8148 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 998afc44-b348-4b8d-981b-08d5a5d58b74 X-MS-Exchange-CrossTenant-Id: eaa689b4-8f87-40e0-9c6f-7228de4d754a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=eaa689b4-8f87-40e0-9c6f-7228de4d754a;Ip=[137.71.25.55];Helo=[nwd2mta1.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB3050 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18.04.2018 21:25, Hernán Gonzalez wrote: > On Sun, Apr 15, 2018 at 12:31 PM, Jonathan Cameron wrote: >> On Fri, 13 Apr 2018 13:36:46 -0300 >> Hernán Gonzalez wrote: >> >>> This allows the driver to be probed and removed as a module powering it >>> down on remove(). >>> >>> Signed-off-by: Hernán Gonzalez >>> --- >>> drivers/staging/iio/cdc/ad7746.c | 26 ++++++++++++++++++++++++++ >>> 1 file changed, 26 insertions(+) >>> >>> diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c >>> index c29a221..05506bf9 100644 >>> --- a/drivers/staging/iio/cdc/ad7746.c >>> +++ b/drivers/staging/iio/cdc/ad7746.c >>> @@ -775,6 +775,31 @@ static int ad7746_probe(struct i2c_client *client, >>> return 0; >>> } >>> >>> +static int ad7746_remove(struct i2c_client *client) >>> +{ >>> + struct iio_dev *indio_dev = i2c_get_clientdata(client); >>> + struct ad7746_chip_info *chip = iio_priv(indio_dev); >>> + unsigned char regval; >>> + int ret; >>> + >>> + mutex_lock(&chip->lock); >>> + >>> + regval = chip->config | AD7746_CONF_MODE_PWRDN; >>> + ret = i2c_smbus_write_byte_data(chip->client, AD7746_REG_CFG, regval); >> As this is a one off operation, perhaps it would be better to factor >> it out to a utility function then use devm_add_action_or_reset in >> the probe? >> >> Also, I am nervous about this change as there doesn't seem to be >> path in probe by which this is deliberately reversed? >> It seems to be 'accidentally' handled by the read_raw write to the >> CFG register. >> >> The data sheet doesn't really mention much about this register >> at all. It may have special requirements to exit from power down - I have >> no idea, but if it is costless, why do we bother with idle mode? >> >> Perhaps Michael can confirm if this is safe to do or not. >> >> > > I guess it'll be better to just drop this until Michael answers. I've > been trying to get a hold of the hw but with no success (or I have to > pay 3 times its cost in shipping), will keep searching though. It's some time since I last worked with the device. I think it would be safe to restore the power on default in the configuration register upon probe. Which would be idle state. Besides a unspecified delay, I don't think there is anything else to handle here. Due to fact it's not specified it might not be required at all. If your planning to do further cleanup on this driver, I ship you an eval board free of charge. Feel free to contact me off-list. > >>> + >>> + mutex_unlock(&chip->lock); >>> + >>> + if (ret < 0) { >>> + dev_warn(&client->dev, "Could NOT Power Down!\n"); >>> + goto out; >>> + } >>> + >>> + iio_device_unregister(indio_dev); >> You can't safely do this against the devm_iio_device_register. >> >>> + >>> +out: >>> + return ret; >>> +} >>> + >>> static const struct i2c_device_id ad7746_id[] = { >>> { "ad7745", 7745 }, >>> { "ad7746", 7746 }, >>> @@ -799,6 +824,7 @@ static struct i2c_driver ad7746_driver = { >>> .of_match_table = of_match_ptr(ad7746_of_match), >>> }, >>> .probe = ad7746_probe, >>> + .remove = ad7746_remove, >>> .id_table = ad7746_id, >>> }; >>> module_i2c_driver(ad7746_driver); >> > -- Greetings, Michael -- Analog Devices GmbH Otl-Aicher Strasse 60-64 80807 München Sitz der Gesellschaft München, Registergericht München HRB 40368, Geschäftsführer: Peter Kolberg, Ali Raza Husain, Eileen Wynne