Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp66778iof; Sun, 5 Jun 2022 21:18:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykJ0f2CVJaBAKnpyFjUG4FhXnpa+0VQtHBH+MNy1ka5ZYRlPgPNyYthAeU/kNEN63J7uRn X-Received: by 2002:a17:902:d591:b0:165:ddec:f6ef with SMTP id k17-20020a170902d59100b00165ddecf6efmr21961882plh.35.1654489118157; Sun, 05 Jun 2022 21:18:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654489118; cv=none; d=google.com; s=arc-20160816; b=RCN/o4JfsJ5HpKkRYf3yBvGos7gUKNvNMt/MpcwrSnuYo1VGKk5s2fIuRnHiJR2rj5 HQhTlhACi/XKDzt9iMDtn5YDaekjcw3oi5PszX3BQk8h3PZga3W1lqHSp6Ik0iOV5cCo EdMqQcwje/OS6SdeWumOft3goTprxoIHKA0WBj2nWnjIO/VT51ZYdah1Or9fJzstuQfj QIic8cluuC0BHmtIAmcYAzyQAUri2WTprT68vhH9uh6ZfmW8gNnSGKKLh1E2xE1C/VHK i/SpSBgn959ye0IDb061CCDaa0l4WuaEIMxh6pbIhuk99N4QeeXa+5/LwJe1rAZzirX+ ZuXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=BRPkzB0Obt6oYcl++dMZO0Ti3gSuzY9Z9516AYxuh28=; b=ZDL5QxOM187MR98yogQaRJFG1sL4khR9PYu1+nklLLms8ByE8ObRdhmYDCvdEQqsIE MHTUjbk5+W+a1KNZjjrH6iLW8AHwgodppxoq+iFglIy3JniaXVDraEgPqVwTBa+FDx9d zv3DLnQDgARbttOkHeOWWausYdnPgwqAIXC4YHpNirQhiOoM81FC33eU1dt1c/qCP6/U Qig9LMc+H1TtoE914NGKR6V6k9V/tUi5Eu4CUMEkpTCzHCrs7OtDsbt/mvyTOe6bVZpO 81GuqzwblvokUR1MInu7md2pjCN4HfYLwPZr24BpC0RmmYGIQpNc2fiB5jbnRPwsHP7p wtlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NQIHWyAN; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z9-20020a63e549000000b003db81483096si14399368pgj.149.2022.06.05.21.18.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 21:18:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NQIHWyAN; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A08967CB69; Sun, 5 Jun 2022 20:52:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343966AbiFENtK (ORCPT + 99 others); Sun, 5 Jun 2022 09:49:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231142AbiFENtI (ORCPT ); Sun, 5 Jun 2022 09:49:08 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0B49F19007 for ; Sun, 5 Jun 2022 06:49:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654436947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BRPkzB0Obt6oYcl++dMZO0Ti3gSuzY9Z9516AYxuh28=; b=NQIHWyANsbR/yZp+uSnTNzuq6Zd5QHetFIompkpd6VWkauhfvL/SUTMcbYnPIkMIfFh9xA WxaI1LkOcT09RZnHz1s7oGzAomw1phXy8S8eoJeDab49Q/2g4SrPDUdm8X8DjY/Eb89b8o 5IKKE9rC5C0GUGl4RFXbeSvpET0Iw8k= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-456-3r0nnc_oOSCa_x-RrqMf0Q-1; Sun, 05 Jun 2022 09:49:03 -0400 X-MC-Unique: 3r0nnc_oOSCa_x-RrqMf0Q-1 Received: by mail-ed1-f71.google.com with SMTP id f9-20020a056402354900b0042ded146259so8758664edd.20 for ; Sun, 05 Jun 2022 06:49:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=BRPkzB0Obt6oYcl++dMZO0Ti3gSuzY9Z9516AYxuh28=; b=uxzt8GFBhECIb/x/miTvO0TVszsuiiBYHouM/NH8qCR8BQOPZYa6qoUG7pntKoC9AB VRsx3CugnDSZD+l4+K0UDvj6MDbtki0xypY+xG6KWybBvg7CWKB2tuGe72paQ/gYcGVx DL60U6r6ySHeW/zRi59qayQz93kLnQpj1ooP2ev1B0muKHSHCaoRXMFKkBgVWh7KECcQ Lj4T91oCbJPWBQh7dFALxL3TQqmp6WWSFaTaYqzPaie2SYY4LzlzUrUPentLE+8971ax r/4E5HSVRFN/vVm906dD+727UllRXGn0SXBcgJZDK7BmlwlccfOgE2JH1EIwAbieSIwH UNFQ== X-Gm-Message-State: AOAM530osM2dXk6K78sJDF5PTfeo70qyvqAfbfLQTMYq3AbzWVeBtUFu v09TsmeXf/YvatcetyqYx0TJU+lQSE77rsSR/Z4hNVZc5ZCLSSRSEU50NrPLl7GOZTpnnGYker7 FELZV8KeRo8PfMrjiLX7EgFE+ X-Received: by 2002:a17:907:3fa4:b0:6fe:b83b:d667 with SMTP id hr36-20020a1709073fa400b006feb83bd667mr17092620ejc.481.1654436942637; Sun, 05 Jun 2022 06:49:02 -0700 (PDT) X-Received: by 2002:a17:907:3fa4:b0:6fe:b83b:d667 with SMTP id hr36-20020a1709073fa400b006feb83bd667mr17092601ejc.481.1654436942399; Sun, 05 Jun 2022 06:49:02 -0700 (PDT) Received: from ?IPV6:2001:1c00:c1e:bf00:d69d:5353:dba5:ee81? (2001-1c00-0c1e-bf00-d69d-5353-dba5-ee81.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:d69d:5353:dba5:ee81]) by smtp.gmail.com with ESMTPSA id h14-20020aa7c94e000000b0042e03eed448sm5734417edt.20.2022.06.05.06.49.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Jun 2022 06:49:01 -0700 (PDT) Message-ID: Date: Sun, 5 Jun 2022 15:49:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] hwmon: (sch56xx-common) Add DMI override table Content-Language: en-US To: Armin Wolf Cc: jdelvare@suse.com, linux@roeck-us.net, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220604220200.2567-1-W_Armin@gmx.de> From: Hans de Goede In-Reply-To: <20220604220200.2567-1-W_Armin@gmx.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 6/5/22 00:02, Armin Wolf wrote: > Some devices like the Fujitsu Celsius W380 do contain > a working sch56xx hardware monitoring device, but do > not contain the necessary DMI onboard device. > > Do not check for the presence of an suitable onboard device > on these machines. The list of affected machines was created > using data collected by the Linux Hardware Project. > > Tested on a Fujitsu Esprimo P720, but sadly not on a affected > machine. > > Fixes: 393935baa45e (hwmon: (sch56xx-common) Add automatic module loading on supported devices) > Signed-off-by: Armin Wolf Thanks, patch looks good to me: Reviewed-by: Hans de Goede Regards, Hans > --- > drivers/hwmon/sch56xx-common.c | 44 ++++++++++++++++++++++++++-------- > 1 file changed, 34 insertions(+), 10 deletions(-) > > diff --git a/drivers/hwmon/sch56xx-common.c b/drivers/hwmon/sch56xx-common.c > index 3ece53adabd6..de3a0886c2f7 100644 > --- a/drivers/hwmon/sch56xx-common.c > +++ b/drivers/hwmon/sch56xx-common.c > @@ -523,6 +523,28 @@ static int __init sch56xx_device_add(int address, const char *name) > return PTR_ERR_OR_ZERO(sch56xx_pdev); > } > > +static const struct dmi_system_id sch56xx_dmi_override_table[] __initconst = { > + { > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), > + DMI_MATCH(DMI_PRODUCT_NAME, "CELSIUS W380"), > + }, > + }, > + { > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), > + DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO P710"), > + }, > + }, > + { > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), > + DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO E9900"), > + }, > + }, > + { } > +}; > + > /* For autoloading only */ > static const struct dmi_system_id sch56xx_dmi_table[] __initconst = { > { > @@ -543,16 +565,18 @@ static int __init sch56xx_init(void) > if (!dmi_check_system(sch56xx_dmi_table)) > return -ENODEV; > > - /* > - * Some machines like the Esprimo P720 and Esprimo C700 have > - * onboard devices named " Antiope"/" Theseus" instead of > - * "Antiope"/"Theseus", so we need to check for both. > - */ > - if (!dmi_find_device(DMI_DEV_TYPE_OTHER, "Antiope", NULL) && > - !dmi_find_device(DMI_DEV_TYPE_OTHER, " Antiope", NULL) && > - !dmi_find_device(DMI_DEV_TYPE_OTHER, "Theseus", NULL) && > - !dmi_find_device(DMI_DEV_TYPE_OTHER, " Theseus", NULL)) > - return -ENODEV; > + if (!dmi_check_system(sch56xx_dmi_override_table)) { > + /* > + * Some machines like the Esprimo P720 and Esprimo C700 have > + * onboard devices named " Antiope"/" Theseus" instead of > + * "Antiope"/"Theseus", so we need to check for both. > + */ > + if (!dmi_find_device(DMI_DEV_TYPE_OTHER, "Antiope", NULL) && > + !dmi_find_device(DMI_DEV_TYPE_OTHER, " Antiope", NULL) && > + !dmi_find_device(DMI_DEV_TYPE_OTHER, "Theseus", NULL) && > + !dmi_find_device(DMI_DEV_TYPE_OTHER, " Theseus", NULL)) > + return -ENODEV; > + } > } > > /* > -- > 2.30.2 >