Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp78770rwd; Fri, 26 May 2023 15:19:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5l/xEuI4v2NQ3TB665Fj2n5YCRetB2NNVHA9jYFQ+X6PftyplrJ0h/6OAqKzAGOT5NlotH X-Received: by 2002:a17:902:e741:b0:1af:fe12:4dd2 with SMTP id p1-20020a170902e74100b001affe124dd2mr4786953plf.18.1685139582212; Fri, 26 May 2023 15:19:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685139582; cv=none; d=google.com; s=arc-20160816; b=i8+BociM3v6Cr+DISXtNA7wFagLmSugcli0V5BeP0sgrknz+CPWkK8acLFFN5SIsE+ GOg2b1PE9MKJS69lRrztGliSekY8jyr39dkKWKByL2LF8WOYskMrfKt72/DqH1hQTAWO qerS5lrj+uBPZOdRUyz8Sji+9hPFkuzORlpizL9kZ0bX+uwOZ+XzVL9xjmY6V5CJgnf8 nAgAqgHhNNCOwKnhNsh9lymIflE6QDwb2KdERK2FE4/Oam2EnlO44foTh9A/Kk2e5GPN GlhJafk1n4hSk9C6LUOQdFy4k/xwgoEYTVYkYECbSAXiObZ5Igilm3xspoA1BBXT7NHn WniQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=oobY8Hnr+V4wGPCWsnIMgT9DHlRXZoBkbIC6BEX23SU=; b=cpKj6T+YIR1Dbp8yAkttmQNmbeQ6Km0/QHB6tCbNfT7NPxwcjTjN2JIs+Z+f6oPDpA CSldqEk807KPo2c5omwK6gBDao7FEGtSsQBSeH1QPMCg4mYhZsrh2YJp2b4Vtli+D+8X ZNWd2JueHbKJIJe8hxmfAmoaYyW5IR+ZpMqpa1KDsyvZEe7OmxENjokKEB33X6JMTWoz 9iJyaW23jcZ4yIEqMu3mr7mFnmV0gk7bM/H1lLq14e+MHJ44VUxeJhb/uH6JNxkx0izQ AxlNdunSK5C6jSt6fu/U0npNOETd3EK568Y1X0xaL2svlUZD2XJ6nA3hqZhmbBIXmevj 2eQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=aWxVHnmK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k10-20020a170902ba8a00b001a1b776489dsi2519149pls.300.2023.05.26.15.19.27; Fri, 26 May 2023 15:19:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=aWxVHnmK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244445AbjEZV6y (ORCPT + 99 others); Fri, 26 May 2023 17:58:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244342AbjEZV6j (ORCPT ); Fri, 26 May 2023 17:58:39 -0400 Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B966CE57; Fri, 26 May 2023 14:58:12 -0700 (PDT) Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-39831cb47fbso870176b6e.1; Fri, 26 May 2023 14:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685138198; x=1687730198; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=oobY8Hnr+V4wGPCWsnIMgT9DHlRXZoBkbIC6BEX23SU=; b=aWxVHnmKMVbtSgYUQYksmmw46grMNqXatXG37GenPMK6H2zm72YHpscZDwyPN8T/m1 Tecjxqo/3hceavTncqvVwiooAL9aqvP0Q4boolJrJzMvIMasnWtNDTbHcgVfVcD68LxZ oA3lbIbMtjcQNCA+LK6FbF2oChOcTdMzhedMmlavhDXJ6Fzd/H0BiIs2L9s15HNyrKuw 2LCRpsRUDZjMlVzham69+vGuVb984kaoKlkPdtqfibEn2/zQFiOFGJ2y6oo+brMzSa45 +zOTYntAgaV2e59iBia3KAgwUNlxWlQc8SKKdNCfz5QzrBqpzq7il/w93zw/3lBiWvx4 lsAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685138198; x=1687730198; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oobY8Hnr+V4wGPCWsnIMgT9DHlRXZoBkbIC6BEX23SU=; b=R/bwr0YRj3E6S9hL9/hf71FgHRt6UUsWzyp7MhtOLDWbfDuO0zrhJAjn7gdG0wMVa5 KIk0jmytE9vz+joxHzrpcLQw1VEBbVcqYoCVNTtFgZhjDDoiJDB7Q5L8DuEIBlZhTWtf Td5DMGBNkkIb+ryhuAMuuU7kMuw40V6kFJpf6X1ILRG0nFA1l0g487VANZy4eomBoGpv D+j5M05NTrwZeekP/JqM5Fg0UIQgf4kWIyY+0GycJ8yz2eDzHMm2SeZndjEhzkZrFiZG FwK2D4VTuxZn3tIVAtI1+g2/KCQ99VyUn/33vj/tHexxQDh3svU5Q5GQWKUUOpQ0WkeI D71w== X-Gm-Message-State: AC+VfDwPMA1EE5AJ5g0aCIiQYKBsUbQfCxwBhGpDBaj89i1gXzKeUvOD DLVAabFZu4z/SV56roTIAJYdGniBwvY= X-Received: by 2002:a05:6808:8ca:b0:398:523a:f1ee with SMTP id k10-20020a05680808ca00b00398523af1eemr1741000oij.21.1685138198134; Fri, 26 May 2023 14:56:38 -0700 (PDT) Received: from smeagol.fibertel.com.ar ([201.235.4.68]) by smtp.gmail.com with ESMTPSA id q6-20020acaf206000000b00399ee6330a9sm756978oih.52.2023.05.26.14.56.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 14:56:37 -0700 (PDT) From: =?UTF-8?q?Joaqu=C3=ADn=20Ignacio=20Aramend=C3=ADa?= To: linux@roeck-us.net Cc: =?UTF-8?q?Joaqu=C3=ADn=20Ignacio=20Aramend=C3=ADa?= , derekjohn.clark@gmail.com, jdelvare@suse.com, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] hwmon: (oxp-sensors) Differentiate new BIOS for the Mini Date: Fri, 26 May 2023 18:56:22 -0300 Message-Id: <20230526215621.16075-1-samsagax@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Newer BIOS got some other changes aside from string changes. Add a board enum to differentiate it from the old OneXplayer Mini AMD BIOS. Signed-off-by: Joaquín Ignacio Aramendía --- drivers/hwmon/oxp-sensors.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/oxp-sensors.c b/drivers/hwmon/oxp-sensors.c index 0ec7588610ad..423307ed4930 100644 --- a/drivers/hwmon/oxp-sensors.c +++ b/drivers/hwmon/oxp-sensors.c @@ -47,6 +47,7 @@ enum oxp_board { aya_neo_air_pro, aya_neo_geek, oxp_mini_amd, + oxp_mini_amd_a07, oxp_mini_amd_pro, }; @@ -104,7 +105,7 @@ static const struct dmi_system_id dmi_table[] = { DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER mini A07"), }, - .driver_data = (void *)oxp_mini_amd, + .driver_data = (void *)oxp_mini_amd_a07, }, { .matches = { @@ -206,6 +207,7 @@ static int oxp_platform_read(struct device *dev, enum hwmon_sensor_types type, case aya_neo_air_pro: case aya_neo_geek: case oxp_mini_amd: + case oxp_mini_amd_a07: *val = (*val * 255) / 100; break; case oxp_mini_amd_pro: @@ -247,6 +249,7 @@ static int oxp_platform_write(struct device *dev, enum hwmon_sensor_types type, case aya_neo_air_pro: case aya_neo_geek: case oxp_mini_amd: + case oxp_mini_amd_a07: val = (val * 100) / 255; break; case aok_zoe_a1: -- 2.40.1