Received: by 10.192.165.148 with SMTP id m20csp175058imm; Tue, 24 Apr 2018 19:51:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx49GB4yp78L8f1BWf9XZJMvLLM4C9cVrqJnriNeXxaLli50P2mNpHBluubUXhfi8IbasnQkD X-Received: by 10.99.106.196 with SMTP id f187mr13247572pgc.0.1524624664175; Tue, 24 Apr 2018 19:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524624664; cv=none; d=google.com; s=arc-20160816; b=rGlN19hee6u4tfwJJ1npE5JY5DX2hDWsjIv9TeFXJMfva27ioJIbs8J2Z3SQzt8mEz 6P1sXwPJu3hCaG5KEcnYveqdn53DJ+NX5VwdTSj5DO8an676QOfN0ekEZ7qCP5V01/NM Oy7ljZ4mJGhRyLRS2nj5SNVGzB+RAfTEJ+rXtQ395X03/l9zZWoZCRgDlBLKF+jhfGM/ 7rhF7qIzL9atDs9Myh33iN/rVMAuoHWErxG7VjzBpYBSZt6d8luDTktsTYQPsskkmTst aANOYdn48ZNBJEDmYk3J4Ftyb5a6uOKpZDHwIGBdi1o4PB8Ln+Yb6kgeeeMI32luGjdH eMAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=v0dTKSjAa2+eTkZ/GMxsvdoAH56LI9UmuKNQebF2Xqo=; b=Fx9XK/WtE1GBw0RgIUm9NJbhHVi6OuXd8PAzZeuaHSQLA52TIbMOUuiDUnLVQQm7Li zhuDAcwHFxm9yg1r2IGzxEYs5dHlwuvIrURpIrvt3KoGxQ8U9/+cl/tCXJ+/YcUq0SSH vlR1W+6E7BDlAcGgJv49Fd4kUK8TTHZXzr0KH2w+CGKJig38NWuwpRFIftg3hUub77sX s90pVIer4TVvnXhqQXiKVE5oGlzWT61c64V3pjmS00vEtkJ0Zrm0IU1ltJNeAsJa+Goj zHZEeNq5fwFDvtJ2ETWr45qFxc5qoJmU9b7wcTkuwIx0A6Ek1ekfT/y6oLzK8BcD7vVn dJtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2-v6si2061530pls.422.2018.04.24.19.50.18; Tue, 24 Apr 2018 19:51:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751323AbeDYCqu (ORCPT + 99 others); Tue, 24 Apr 2018 22:46:50 -0400 Received: from mga09.intel.com ([134.134.136.24]:61540 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751110AbeDYCqt (ORCPT ); Tue, 24 Apr 2018 22:46:49 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2018 19:46:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,325,1520924400"; d="scan'208";a="35932813" Received: from vkoul-udesk7.iind.intel.com (HELO localhost) ([10.223.84.143]) by orsmga007.jf.intel.com with ESMTP; 24 Apr 2018 19:46:44 -0700 Date: Wed, 25 Apr 2018 08:21:25 +0530 From: Vinod Koul To: Simon Glass Cc: LKML , C Shapiro , Aaron Durbin , Mika Westerberg , Jonathan Corbet , Philippe Ombredanne , Andy Shevchenko , Alex Hung , Dmitry Torokhov , Greg Kroah-Hartman , Jean Delvare , sayli karnik , Sagar Dharia Subject: Re: [PATCH] firmware: dmi: Add access to the SKU ID string Message-ID: <20180425025125.GH6014@localhost> References: <20180424211111.140374-1-sjg@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180424211111.140374-1-sjg@chromium.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 24, 2018 at 03:11:11PM -0600, Simon Glass wrote: > This is used in some systems from user space for determining the identity > of the device. > > Expose this as a file so that that user-space tools don't need to read > from /sys/firmware/dmi/tables/DMI sysfs is an ABI and needs to be documented, I don't see that in this patch, pls add. > > Signed-off-by: Simon Glass > --- > > drivers/firmware/dmi-id.c | 2 ++ > drivers/firmware/dmi_scan.c | 1 + > include/linux/mod_devicetable.h | 1 + > 3 files changed, 4 insertions(+) > > diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c > index 951b6c79f166a..fe78c7f801163 100644 > --- a/drivers/firmware/dmi-id.c > +++ b/drivers/firmware/dmi-id.c > @@ -48,6 +48,7 @@ DEFINE_DMI_ATTR_WITH_SHOW(product_version, 0444, DMI_PRODUCT_VERSION); > DEFINE_DMI_ATTR_WITH_SHOW(product_serial, 0400, DMI_PRODUCT_SERIAL); > DEFINE_DMI_ATTR_WITH_SHOW(product_uuid, 0400, DMI_PRODUCT_UUID); > DEFINE_DMI_ATTR_WITH_SHOW(product_family, 0444, DMI_PRODUCT_FAMILY); > +DEFINE_DMI_ATTR_WITH_SHOW(product_sku, 0444, DMI_PRODUCT_SKU); > DEFINE_DMI_ATTR_WITH_SHOW(board_vendor, 0444, DMI_BOARD_VENDOR); > DEFINE_DMI_ATTR_WITH_SHOW(board_name, 0444, DMI_BOARD_NAME); > DEFINE_DMI_ATTR_WITH_SHOW(board_version, 0444, DMI_BOARD_VERSION); > @@ -193,6 +194,7 @@ static void __init dmi_id_init_attr_table(void) > ADD_DMI_ATTR(product_serial, DMI_PRODUCT_SERIAL); > ADD_DMI_ATTR(product_uuid, DMI_PRODUCT_UUID); > ADD_DMI_ATTR(product_family, DMI_PRODUCT_FAMILY); > + ADD_DMI_ATTR(product_sku, DMI_PRODUCT_SKU); > ADD_DMI_ATTR(board_vendor, DMI_BOARD_VENDOR); > ADD_DMI_ATTR(board_name, DMI_BOARD_NAME); > ADD_DMI_ATTR(board_version, DMI_BOARD_VERSION); > diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c > index 54e66adef2525..f2483548cde92 100644 > --- a/drivers/firmware/dmi_scan.c > +++ b/drivers/firmware/dmi_scan.c > @@ -447,6 +447,7 @@ static void __init dmi_decode(const struct dmi_header *dm, void *dummy) > dmi_save_ident(dm, DMI_PRODUCT_VERSION, 6); > dmi_save_ident(dm, DMI_PRODUCT_SERIAL, 7); > dmi_save_uuid(dm, DMI_PRODUCT_UUID, 8); > + dmi_save_ident(dm, DMI_PRODUCT_SKU, 25); > dmi_save_ident(dm, DMI_PRODUCT_FAMILY, 26); > break; > case 2: /* Base Board Information */ > diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h > index 7d361be2e24f4..cb8487e29d3ae 100644 > --- a/include/linux/mod_devicetable.h > +++ b/include/linux/mod_devicetable.h > @@ -491,6 +491,7 @@ enum dmi_field { > DMI_PRODUCT_SERIAL, > DMI_PRODUCT_UUID, > DMI_PRODUCT_FAMILY, > + DMI_PRODUCT_SKU, > DMI_BOARD_VENDOR, > DMI_BOARD_NAME, > DMI_BOARD_VERSION, > -- > 2.17.0.484.g0c8726318c-goog > -- ~Vinod