From patchwork Wed Mar 21 09:22:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alvaro Gamez X-Patchwork-Id: 10298993 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 96BAC600CC for ; Wed, 21 Mar 2018 09:22:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88D0C28B95 for ; Wed, 21 Mar 2018 09:22:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8716028CD6; Wed, 21 Mar 2018 09:22:46 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 D8796297ED for ; Wed, 21 Mar 2018 09:22:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751508AbeCUJWE (ORCPT ); Wed, 21 Mar 2018 05:22:04 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:54377 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751405AbeCUJWD (ORCPT ); Wed, 21 Mar 2018 05:22:03 -0400 Received: by mail-wm0-f66.google.com with SMTP id h76so8339056wme.4 for ; Wed, 21 Mar 2018 02:22:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hazent-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=dpmq0qOI9LjmTeW5NSk79e+nzSwncj9jC6evoPKjKH4=; b=eCWiJu6xteCfHlIj8rbb6QbOmiMjWycMmaJ3lsKpIqXgF6+Ev/3YCveL3ISHd3sFOx tjAiB0hCAiG3IPn0siLVZKjb5YEWWPke9kBqlqeZT0jz9HkR2rhxKRM4eMM6u0KVdJCv NikomqJoUyH5BkNYRFRqXDHZU89SmrdhoFQu7YIjkfLrwx6a4d+NHKV+q/S4LKcI/ieV bzl93SUhL0n3cLn+KcknYJx7RDngrWwZMZJYIlqEcBOWTJpqZUDMI+0As5bTEfVs2vx4 sY7WcPHlKQD9KpbBFUdxsRWN5o5PuySRypGUWS2BDR+ruFhKUMvt60nw8jCHAfGN05mb MFHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=dpmq0qOI9LjmTeW5NSk79e+nzSwncj9jC6evoPKjKH4=; b=ZFhq1dyYQfgeIFp9R4oTdy63xnSpJvKVnDK86Vcz+zHbLOOf5npQzI+m0vy9si9/Fr pmgOhauLkjJwTPCTg8WXbMzOrNgrYUqU9jszVrR1IA4+93yKZTJdBQs0QPo4aF8nSio/ Xz4MUfo/FlN2B4hi5UUEqaWWlfQmosYbjc9jxuvgAGisbzqPM2ndQKUzZAfQJTxoOqYA FsGLG0/cEtTeMBIS53azHYHWDmBOz33kc0FOp2oEYyMQ5nWD7X/Pt5VqX98rE7wzrpBE U68IGfQOppIpY9Zb1xSCraqeTCw0SYWPR66Le38IWjEOMvGq9LNnr3UNO4P2N3tQUD1f XB2w== X-Gm-Message-State: AElRT7EOw/bHQGtiW6t1QR+/dUjuiy3IzDnghehuErExaepciG3vQ2ut v9IqanoyicKgTsKZPrmrXF4uJQ== X-Google-Smtp-Source: AG47ELtJAyjVr3o1+hapK+URUKk5i/MvTndgow0TLwVwYVCyFFGVtY+t0iNflV3MHaTQVDLnz0Rw/A== X-Received: by 10.28.159.209 with SMTP id i200mr1851887wme.87.1521624122014; Wed, 21 Mar 2018 02:22:02 -0700 (PDT) Received: from salem.gmr.ssr.upm.es (salem.gmr.ssr.upm.es. [138.4.36.7]) by smtp.gmail.com with ESMTPSA id 74sm3880411wmf.26.2018.03.21.02.22.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Mar 2018 02:22:00 -0700 (PDT) From: Alvaro Gamez Machado To: Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org Cc: Alvaro Gamez Machado Subject: [PATCH] hwmon: (lm92) Remove spurious test that prevented max6335 detection Date: Wed, 21 Mar 2018 10:22:36 +0100 Message-Id: <20180321092236.22204-1-alvaro.gamez@hazent.com> X-Mailer: git-send-email 2.16.2 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 An assumption was made that reads of a max6335 LM92_REG_MAN_ID register would return the last value read from any other of its register. This assumption is not only something that is not documented anywhere, but it is also untrue, so this prevented max6335 recognition. Signed-off-by: Alvaro Gamez Machado --- drivers/hwmon/lm92.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/hwmon/lm92.c b/drivers/hwmon/lm92.c index 2a91974a10bb..a2c3f3080192 100644 --- a/drivers/hwmon/lm92.c +++ b/drivers/hwmon/lm92.c @@ -272,16 +272,8 @@ static int max6635_check(struct i2c_client *client) u8 conf; int i; - /* - * No manufacturer ID register, so a read from this address will - * always return the last read value. - */ temp_low = i2c_smbus_read_word_data(client, LM92_REG_TEMP_LOW); - if (i2c_smbus_read_word_data(client, LM92_REG_MAN_ID) != temp_low) - return 0; temp_high = i2c_smbus_read_word_data(client, LM92_REG_TEMP_HIGH); - if (i2c_smbus_read_word_data(client, LM92_REG_MAN_ID) != temp_high) - return 0; /* Limits are stored as integer values (signed, 9-bit). */ if ((temp_low & 0x7f00) || (temp_high & 0x7f00))