From patchwork Wed Mar 21 09:27:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alvaro Gamez X-Patchwork-Id: 10298999 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 18A40600CC for ; Wed, 21 Mar 2018 09:26:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E94328C02 for ; Wed, 21 Mar 2018 09:26:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 033F7297A5; Wed, 21 Mar 2018 09:26:29 +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 79DE928C02 for ; Wed, 21 Mar 2018 09:26:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751545AbeCUJ02 (ORCPT ); Wed, 21 Mar 2018 05:26:28 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:37983 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751459AbeCUJ01 (ORCPT ); Wed, 21 Mar 2018 05:26:27 -0400 Received: by mail-wr0-f193.google.com with SMTP id l8so4428380wrg.5 for ; Wed, 21 Mar 2018 02:26:26 -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=pl4/R0pyV1E7eL8skeCCcZ4LPZcxV4nBHXaDdv1kpp4=; b=SIU2zMeusN5p2EqM4nB3GXS9sGgQC/Vm9AUuXAyUxBuxw4qhNxNeMY3TR0zw35tRXa m+jE2nBfkOvE1Ny90zkDUt6Matl02SCAh/X5/2/ed0PG041qicZcJ6SnYah+GKtiVmUJ ndwVvnZgRctSbkU+6kDnhPJQkod7ZzVUrPmPZ9A0zkhNlKePpMLhm+eknavaeTVi2rt9 +G8krTTpb7M95sbyA6tL89uq5Mh8wy/A9UxzL4lFVfYrR+Gf/RsAHa6xOUPvGBCov3ze 0Y7rjkJesXtgNwW1loAGDqBGN6ku/O72x+dQBHr3sGmLgnfyaUu0RwTup2RqSHpPs1et /HGw== 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=pl4/R0pyV1E7eL8skeCCcZ4LPZcxV4nBHXaDdv1kpp4=; b=VEbzqBYMfO1tDoIfEbikSg07TUFT0emnBidOO8Jds0mYWkO/BUu54hOw3eQ48d4mPF Wn0TwEpoRhI3LgjXyl2Xu57R/PxJk6cS8hUhQevMmy/1GfEj+kBZTaxf/jYSw5Olgq9/ J5usCZ52EgGeM8ngwmXQ4LL60qIQ9cNJWpy+jFqm+GyHeRodEXbCpa0i0WgMC/DKPBRp n7l0FqFMLLzOUMlDrZQ1EvK+JxMKSIDPuL8IwL4/lE7cBvSy4k1bTbF+6R0H+0v828nN lhcoLjhWlOlht9p4JkBBapQg084AHejr9OlpgbPPwYf+qOWogGVr3Mps7Bn5PRy+HemN zQFg== X-Gm-Message-State: AElRT7HqUny0KKLbB44VTB/zKwZRJtHVdOCTW2im/UuyKQHOZ5k0iMpU OOMESYX+CafzTXw3oNIjLWcTLgpU X-Google-Smtp-Source: AG47ELuf+VLLTcBSp+jM9ScvO7MdAeaCacbLNTkKadGThNpYxdsZXF654Em7PQliF0o2oQMEGsMCTg== X-Received: by 10.223.182.13 with SMTP id f13mr3924107wre.262.1521624386110; Wed, 21 Mar 2018 02:26:26 -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 s49sm5275831wrc.95.2018.03.21.02.26.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Mar 2018 02:26:25 -0700 (PDT) From: Alvaro Gamez Machado To: Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org Cc: Alvaro Gamez Machado Subject: [PATCH v2] hwmon: (lm92) Remove spurious test that prevented max6635 detection Date: Wed, 21 Mar 2018 10:27:09 +0100 Message-Id: <20180321092709.22377-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 max6635 LM92_REG_MAN_ID register would return the last value read from any other of its registers. This assumption is not only something that is not documented anywhere, but it is also untrue, so this prevented max6635 recognition. Signed-off-by: Alvaro Gamez Machado --- Changes in v2: Sorry, I seem to be slightly dyslexic and keep confusing max6635 <> max6335 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))