From patchwork Tue Aug 7 08:57:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: IKEGAMI Tokunori X-Patchwork-Id: 10558397 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 4CC231390 for ; Tue, 7 Aug 2018 08:58:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 396B929B6A for ; Tue, 7 Aug 2018 08:58:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D85829B76; Tue, 7 Aug 2018 08:58:30 +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 3DE5C29B6A for ; Tue, 7 Aug 2018 08:58:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388534AbeHGLLr (ORCPT ); Tue, 7 Aug 2018 07:11:47 -0400 Received: from mail1.bemta24.messagelabs.com ([67.219.250.113]:26426 "EHLO mail1.bemta24.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727669AbeHGLLr (ORCPT ); Tue, 7 Aug 2018 07:11:47 -0400 Received: from [67.219.250.196] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-2.bemta.az-b.us-west-2.aws.symcld.net id 22/FC-01609-33F596B5; Tue, 07 Aug 2018 08:58:27 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrELMWRWlGSWpSXmKPExsUyLfyHiK5xfGa 0wcNfHBbtr7cyOjB6fN4kF8AYxZqZl5RfkcCa0X3+FGvBH7aKO4sWMDUw/mPtYuTkEBKYwyjx bJVYFyMXkP2TUeJY3xomkASbgKnE9FcLGUFsEQEViS3r1jCDFDELrGKU+L7sAFiRsICPxJxpp 8BsFgFViWXT+9hBbF4BR4llOzeDbZAQkJc4/KYJapumxPOe74wQ8WCJI8/2sE9g5F7AyLCK0S KpKDM9oyQ3MTNH19DAQNfQ0EjX0NhU19DEXC+xSjdJr7RYtzy1uETXSC+xvFivuDI3OSdFLy+ 1ZBMj0P8MQLCD8fWhlEOMkhxMSqK8RcqZ0UJ8SfkplRmJxRnxRaU5qcWHGGU4OJQkeN/FAuUE i1LTUyvSMnOAgQiTluDgURLh3QqS5i0uSMwtzkyHSJ1i1OX4837qJGYhlrz8vFQpcd7aOKAiA ZCijNI8uBGwqLjEKCslzMsIdJQQT0FqUW5mCar8K0ZxDkYlYV5jkCk8mXklcJteAR3BBHTEG2 2wI0oSEVJSDYxM8x74hV1l2f8qmLFwX8uKSbKXFq34U6r69dZZs+XPNVjrXsudXOPWxPo35+P bVZ5TdnW/rahTuG3mKOl/bEtcfLfFO1nOGOnQq/VqbXdr03tkrHWZPs3t79kQEdn1g/FbZSyj Uc1EKctVGpNqoz39nzmtqzM4Ilfy0SWfK8O9fKnzs7K0MiWW4oxEQy3mouJEAJlAWRSFAgAA X-Env-Sender: ikegami@allied-telesis.co.jp X-Msg-Ref: server-32.tower-344.messagelabs.com!1533632306!2736544!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 31220 invoked from network); 7 Aug 2018 08:58:26 -0000 Received: from abricot-inet.allied-telesis.co.jp (HELO TKY-DS01.at.lc) (150.87.248.20) by server-32.tower-344.messagelabs.com with SMTP; 7 Aug 2018 08:58:26 -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); Tue, 7 Aug 2018 17:58:25 +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 ; Tue, 7 Aug 2018 17:58:25 +0900 From: Tokunori Ikegami To: Jean Delvare Cc: Tokunori Ikegami , Guenter Roeck , Chris Packham , linux-hwmon@vger.kernel.org Subject: [PATCH 0/4] hwmon: (adt7475) Add error handling for update function Date: Tue, 7 Aug 2018 17:57:29 +0900 Message-Id: <20180807085733.28756-1-ikegami@allied-telesis.co.jp> X-Mailer: git-send-email 2.16.1 X-OriginalArrivalTime: 07 Aug 2018 08:58:25.0936 (UTC) FILETIME=[CD5BA100:01D42E2C] 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 | 347 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 252 insertions(+), 95 deletions(-)