Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5920421ybp; Tue, 8 Oct 2019 10:10:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkKK7SfIEvGXU1Cmt5fdp618mS6z9W9pR8U+hGTsfm6+6q5OrFGIRPooGGoU5KoPAdjFdc X-Received: by 2002:a50:dac2:: with SMTP id s2mr35089512edj.26.1570554644925; Tue, 08 Oct 2019 10:10:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570554644; cv=none; d=google.com; s=arc-20160816; b=NutjQOnJtE0OmVJpKKhjv2kTip3YUDDac2VcJfRMDeHKI0SyA+SHS35bC2BUYj9RuU 4oM2HY2VP3DFueMJpVvadm5oOs+Sh9ELxC5+s3Uc4L+D/x4q9sEkemnaOahewqtkPo9h ijAUgfHy0ktu3I9KE4bmPVTyAOyx6+HI5Ge9/VshFs5rWK29oED49xTAYKwdCotZpQwc tVFhGeRbVgrF5rBIVoVQ6v6bGJrYobvDfQxfYJkmblzJXDsy9W1Nsei1FRxNT6PYIicP U0lOygSIDuu1FWaTG5dfusnZT2FCB12cjSNImbxBKindg6ztQGNXbXBanc5rMzPut/li NaIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=pHsSsNTFQ7bkqWk0a6UfkQMOb+LjYOPJEfW60irkfAg=; b=E9l9kWKVCqpkVEk4uUrt8QKZIMyAZbmXUdIzCVpjOS12gK3Xny6SLl1OsB6peio5Ix 90YihnBgyslsRsQwnBOd4PBmZ51aCxt89y1w5wvd6UJr9kABzST/7PDgGtoWEM1AORVx u63c2yn+1JG1vWsoEdrVzJP7b2uD0yfVDsftaepD0ObnckXasxgkHpSpJ+cF2yP/qT3T 9/Q++JPHCtTLtSmB7tSS+9QZlKdTZrHo9KZ93DK56IL/2vt0IR/ta/Yh5UB6ohFZHkOZ aSPLdkxfB+WYGbbI+TbgO4YbLVe9dUxWGvFg+VMIljiB0fsLKt0LUyfPmoV8FMR8GD11 2K4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="iHd/rtuI"; dkim=pass header.i=@codeaurora.org header.s=default header.b="iHd/rtuI"; 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 b9si10445762eda.129.2019.10.08.10.10.21; Tue, 08 Oct 2019 10:10:44 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b="iHd/rtuI"; dkim=pass header.i=@codeaurora.org header.s=default header.b="iHd/rtuI"; 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 S1727224AbfJHRKK (ORCPT + 99 others); Tue, 8 Oct 2019 13:10:10 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57020 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbfJHRKJ (ORCPT ); Tue, 8 Oct 2019 13:10:09 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E718660709; Tue, 8 Oct 2019 17:10:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1570554608; bh=Hl31l3HzL5RJakGhA/0Av14OVr8Gji2rQOUJ4T9TSIs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iHd/rtuIymcUsQq10MFmlHuU9cEYiM4GYFrSEl3S23iWaDpmqcmlBoOCpep8jyllw c7+wworL1NhWBSDjBDgYTBLyW0CsQk6npOTgHsAhloZvOkV0nhh2fvb9kag7HYRGEC tHNyZHimMeuAfcVzpxoNYWWTy2DiPPK0iDCIqcT4= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 0B153602C8; Tue, 8 Oct 2019 17:10:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1570554608; bh=Hl31l3HzL5RJakGhA/0Av14OVr8Gji2rQOUJ4T9TSIs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iHd/rtuIymcUsQq10MFmlHuU9cEYiM4GYFrSEl3S23iWaDpmqcmlBoOCpep8jyllw c7+wworL1NhWBSDjBDgYTBLyW0CsQk6npOTgHsAhloZvOkV0nhh2fvb9kag7HYRGEC tHNyZHimMeuAfcVzpxoNYWWTy2DiPPK0iDCIqcT4= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 08 Oct 2019 10:10:08 -0700 From: mnalajal@codeaurora.org To: Greg KH Cc: Stephen Boyd , rafael@kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org Subject: Re: [PATCH v2] base: soc: Handle custom soc information sysfs entries In-Reply-To: <20191008154346.GA2881455@kroah.com> References: <1570480662-25252-1-git-send-email-mnalajal@codeaurora.org> <5d9cac38.1c69fb81.682ec.053a@mx.google.com> <20191008154346.GA2881455@kroah.com> Message-ID: <463ec0b5a3f1946df0ed2771ba741545@codeaurora.org> X-Sender: mnalajal@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-10-08 08:43, Greg KH wrote: > On Tue, Oct 08, 2019 at 08:33:11AM -0700, Stephen Boyd wrote: >> Quoting Murali Nalajala (2019-10-07 13:37:42) >> > Soc framework exposed sysfs entries are not sufficient for some >> > of the h/w platforms. Currently there is no interface where soc >> > drivers can expose further information about their SoCs via soc >> > framework. This change address this limitation where clients can >> > pass their custom entries as attribute group and soc framework >> > would expose them as sysfs properties. >> > >> > Signed-off-by: Murali Nalajala >> > --- >> >> Reviewed-by: Stephen Boyd >> > > Nice, can we convert the existing soc drivers to use this interface > instead of the "export the device pointer" mess that they currently > have? That way we can drop that function entirely. > Thank you for the reviews. In the current linux tree i can find these driver instances who is using "soc_device_to_device" for populating their sysfs entries. drivers/soc/ux500/ux500-soc-id.c: parent = soc_device_to_device(soc_dev); drivers/soc/tegra/fuse/fuse-tegra.c: return soc_device_to_device(dev); drivers/soc/amlogic/meson-gx-socinfo.c: dev = soc_device_to_device(soc_dev); drivers/soc/amlogic/meson-mx-socinfo.c: dev_info(soc_device_to_device(soc_dev), "Amlogic %s %s detected\n", drivers/soc/imx/soc-imx8.c: ret = device_create_file(soc_device_to_device(soc_dev), drivers/soc/imx/soc-imx-scu.c: ret = device_create_file(soc_device_to_device(soc_dev), drivers/soc/versatile/soc-realview.c: device_create_file(soc_device_to_device(soc_dev), &realview_manf_attr); drivers/soc/versatile/soc-realview.c: device_create_file(soc_device_to_device(soc_dev), &realview_board_attr); drivers/soc/versatile/soc-realview.c: device_create_file(soc_device_to_device(soc_dev), &realview_arch_attr); drivers/soc/versatile/soc-realview.c: device_create_file(soc_device_to_device(soc_dev), &realview_build_attr); drivers/soc/versatile/soc-integrator.c: dev = soc_device_to_device(soc_dev); These drivers can use the current proposed approach to expose their sysfs entries. Will try to address these and submit. But i can't able to test these changes because i do not have these h/w's > thanks, > > greg k-h