From patchwork Wed Aug 8 01:32:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: IKEGAMI Tokunori X-Patchwork-Id: 10559381 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 D041313B4 for ; Wed, 8 Aug 2018 01:36:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB35C2040D for ; Wed, 8 Aug 2018 01:36:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF74E26256; Wed, 8 Aug 2018 01:36:26 +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 905E22040D for ; Wed, 8 Aug 2018 01:36:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726254AbeHHDxe (ORCPT ); Tue, 7 Aug 2018 23:53:34 -0400 Received: from mail1.bemta24.messagelabs.com ([67.219.250.115]:30640 "EHLO mail1.bemta24.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726245AbeHHDxe (ORCPT ); Tue, 7 Aug 2018 23:53:34 -0400 Received: from [67.219.250.196] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-4.bemta.az-b.us-west-2.aws.symcld.net id BD/FB-01623-7194A6B5; Wed, 08 Aug 2018 01:36:23 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrELMWRWlGSWpSXmKPExsUyLfyHiK64Z1a 0wZsZ4hbtr7cyOjB6fN4kF8AYxZqZl5RfkcCa0fWjh7HgD1vFtxcHGBsY/7F2MXJxCAnMYZT4 +W4FlPOTUeLT3HNsXYycHGwCphLTXy1kBLFFBFQktqxbwwxSxCywilHi+7IDTCAJYQF/ie5Pj 5hBbBYBVYnziy+xgti8Ao4S2/v2gA2SEJCXOPymCSwuJKAp8bznOyNEPFjiyuU7jBMYuRcwMq xiNE8qykzPKMlNzMzRNTQw0DU0NNI1NDbSNTbXS6zSTdIrLdYtTy0u0TXSSywv1iuuzE3OSdH LSy3ZxAj0PwMQ7GB8eCjlEKMkB5OSKO/nb5nRQnxJ+SmVGYnFGfFFpTmpxYcYZTg4lCR4wzyy ooUEi1LTUyvSMnOAgQiTluDgURLhVQNJ8xYXJOYWZ6ZDpE4x6nL8eT91ErMQS15+XqqUOG8SS JEASFFGaR7cCFhUXGKUlRLmZQQ6SoinILUoN7MEVf4VozgHo5IwbybIFJ7MvBK4Ta+AjmACOu KNdibIESWJCCmpBsbQDSUz/5muvuHzYutr4xPiR6sttaYWhCdrPjharv333IoVq9+3CRsy7gz JdgjwWvDIlqvQc/tKn2M3xJzO+y9jW7Fa+bTiteJgddGMAwFZz151cxROTIycGX3cJTG7/EhF LUtag39EaY7v/fqoUF6uY8tmqLHsa8sptCm7FXq1LN10TuqTuUosxRmJhlrMRcWJAI0xUIyFA gAA X-Env-Sender: ikegami@allied-telesis.co.jp X-Msg-Ref: server-11.tower-344.messagelabs.com!1533692182!2778562!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 14680 invoked from network); 8 Aug 2018 01:36:23 -0000 Received: from abricot-inet.allied-telesis.co.jp (HELO TKY-DS01.at.lc) (150.87.248.20) by server-11.tower-344.messagelabs.com with SMTP; 8 Aug 2018 01:36:23 -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 10:36:22 +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 10:36:21 +0900 From: Tokunori Ikegami To: Jean Delvare Cc: Tokunori Ikegami , Guenter Roeck , Chris Packham , linux-hwmon@vger.kernel.org Subject: [PATCH v3 0/4] hwmon: (adt7475) Add error handling for update function Date: Wed, 8 Aug 2018 10:32:15 +0900 Message-Id: <20180808013219.26118-1-ikegami@allied-telesis.co.jp> X-Mailer: git-send-email 2.16.1 X-OriginalArrivalTime: 08 Aug 2018 01:36:22.0244 (UTC) FILETIME=[366B2A40:01D42EB8] 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 | 340 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 244 insertions(+), 96 deletions(-)