From patchwork Tue Aug 7 15:19:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: IKEGAMI Tokunori X-Patchwork-Id: 10558775 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2DA711390 for ; Tue, 7 Aug 2018 15:19:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B9242A338 for ; Tue, 7 Aug 2018 15:19:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0FB112A33D; Tue, 7 Aug 2018 15:19:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,URIBL_SBL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 212BC2A344 for ; Tue, 7 Aug 2018 15:19:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389290AbeHGReS (ORCPT ); Tue, 7 Aug 2018 13:34:18 -0400 Received: from mail1.bemta24.messagelabs.com ([67.219.250.1]:16057 "EHLO mail1.bemta24.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727429AbeHGReS (ORCPT ); Tue, 7 Aug 2018 13:34:18 -0400 Received: from [67.219.250.100] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-1.bemta.az-a.us-west-2.aws.symcld.net id 28/FE-28970-188B96B5; Tue, 07 Aug 2018 15:19:29 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrELMWRWlGSWpSXmKPExsUyLfyHiG7Djsx og68LjCzaX29ldGD0+LxJLoAxijUzLym/IoE1Y8KKrUwFf9gqus7uZW9g/MfaxcjFISQwh1Fi 3bWXTBDOT0aJ3afWs3UxcnKwCZhKTH+1kBHEFhFQkdiybg0zSBGzwCpGie/LDjCBJIQF/CVWL N8AVsQioCqxvvE9O4jNK+AoceDMDLC4hIC8xOE3TawgtpCApsTznu9AcQ6geLDE5ZOpExi5Fz AyrGK0SCrKTM8oyU3MzNE1NDDQNTQ00jU0NtA1MrbQS6zSTdQrLdYtTy0u0TXSSywv1iuuzE3 OSdHLSy3ZxAj0PwMQ7GBsP5xyiFGSg0lJlPfcxsxoIb6k/JTKjMTijPii0pzU4kOMMhwcShK8 k7YD5QSLUtNTK9Iyc4CBCJOW4OBREuE1BknzFhck5hZnpkOkTjHqcvx5P3USsxBLXn5eqpQ4b y1IkQBIUUZpHtwIWFRcYpSVEuZlBDpKiKcgtSg3swRV/hWjOAejkjDvBJApPJl5JXCbXgEdwQ R0xBttsCNKEhFSUg2MZvoPxZUDOxqtGc69qOL2jSjYELr2p8k184W7drROv39jlf72BwsC+PW 76ta92WvDpXhx7gTGN9KHX30xq5t80elXmvA5n3kaEreXt77OanunlPBafTfzP72duQnym2w1 k7Y1FsxuXHG+a21LyZ0t+WdPX7B+VDuxN/tZ7I18H3fu/E7Worp/SizFGYmGWsxFxYkAoRFPJ 4UCAAA= X-Env-Sender: ikegami@allied-telesis.co.jp X-Msg-Ref: server-19.tower-324.messagelabs.com!1533655168!3098777!1 X-Originating-IP: [150.87.248.20] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.9.15; banners=-,-,- X-VirusChecked: Checked Received: (qmail 25950 invoked from network); 7 Aug 2018 15:19:28 -0000 Received: from abricot-inet.allied-telesis.co.jp (HELO TKY-DS01.at.lc) (150.87.248.20) by server-19.tower-324.messagelabs.com with SMTP; 7 Aug 2018 15:19:28 -0000 Received: from swim-manx.rd.allied-telesis.co.jp ([150.87.21.50]) by TKY-DS01.at.lc with Microsoft SMTPSVC(8.0.9200.16384); Wed, 8 Aug 2018 00:19:27 +0900 Received: from ikegami-pc.rd.allied-telesis.co.jp by swim-manx.rd.allied-telesis.co.jp (AlliedTelesis SMTPRS 1.3 pl 1 ++E6B86F8C687C6288D9B5559052954DC9) with ESMTP id ; Wed, 8 Aug 2018 00:19:26 +0900 From: Tokunori Ikegami To: Jean Delvare Cc: Tokunori Ikegami , Guenter Roeck , Chris Packham , linux-hwmon@vger.kernel.org Subject: [PATCH v2 0/4] hwmon: (adt7475) Add error handling for update function Date: Wed, 8 Aug 2018 00:19:05 +0900 Message-Id: <20180807151909.24433-1-ikegami@allied-telesis.co.jp> X-Mailer: git-send-email 2.16.1 X-OriginalArrivalTime: 07 Aug 2018 15:19:27.0657 (UTC) FILETIME=[08016990:01D42E62] Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently the device update function does not care the I2C SMBus error. This causes a spurious sensor warining detection by sensor application. To prevent this issue add error handling for the update function. Also change the show functions to return error pointer value. Signed-off-by: Tokunori Ikegami Cc: Guenter Roeck Cc: Chris Packham Cc: linux-hwmon@vger.kernel.org Tokunori Ikegami (4): hwmon: (adt7475) Split device update function to measure and limits hwmon: (adt7475) Change valid parameter to bool type hwmon: (adt7475) Change update functions to add error handling hwmon: (adt7475) Change show functions to return error data correctly drivers/hwmon/adt7475.c | 346 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 250 insertions(+), 96 deletions(-)