From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 857B9C47088 for ; Wed, 26 May 2021 07:54:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 69DAA61437 for ; Wed, 26 May 2021 07:54:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231982AbhEZH4X (ORCPT ); Wed, 26 May 2021 03:56:23 -0400 Received: from mga17.intel.com ([192.55.52.151]:1698 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231998AbhEZH4W (ORCPT ); Wed, 26 May 2021 03:56:22 -0400 IronPort-SDR: nxpnwqmksiAezhgL5EXgcKsxf47edoQYs+zF+X67YCaWAXHl7o28PNp7lbyynyI8j6Hln74Xqm yrmCv8GszZtQ== X-IronPort-AV: E=McAfee;i="6200,9189,9995"; a="182732023" X-IronPort-AV: E=Sophos;i="5.82,330,1613462400"; d="scan'208";a="182732023" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 00:54:50 -0700 IronPort-SDR: BOWpYMucKBb3PRHow4HJKfeFxbQ+pJKhFKY5nU+pkjl7zsFefbeEHbETfh1r5dRm5uMGJqIp9W Suf9sRUeo7HA== X-IronPort-AV: E=Sophos;i="5.82,330,1613462400"; d="scan'208";a="464672901" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 00:54:43 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lloND-00EkYe-AH; Wed, 26 May 2021 10:54:39 +0300 Date: Wed, 26 May 2021 10:54:39 +0300 From: Andy Shevchenko To: Daniel Scally Cc: "Rafael J . Wysocki" , Wolfram Sang , Lee Jones , Hans de Goede , Maximilian Luz , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org, platform-driver-x86@vger.kernel.org, devel@acpica.org, Len Brown , Mika Westerberg , Russell King , Linus Walleij , Bartosz Golaszewski , Mark Gross , Robert Moore , Erik Kaneda , laurent.pinchart@ideasonboard.com, kieran.bingham@ideasonboard.com Subject: Re: [PATCH v4 7/8] platform/x86: Add intel_skl_int3472 driver Message-ID: References: <20210520140928.3252671-1-djrscally@gmail.com> <20210520140928.3252671-8-djrscally@gmail.com> <6294177b-d6e1-8bbd-d313-5cce1c498604@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6294177b-d6e1-8bbd-d313-5cce1c498604@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Tue, May 25, 2021 at 11:53:21PM +0100, Daniel Scally wrote: > On 21/05/2021 13:57, Andy Shevchenko wrote: ... > >> +static const struct regulator_ops int3472_gpio_regulator_ops; > > Hmm... Can you use 'reg-fixed-voltage' platform device instead? > > > > One example, although gone from upstream, but available in the tree, I can > > point to is this: > > > > git log -p -- arch/x86/platform/intel-mid/device_libs/platform_bcm43xx.c > > > > It uses constant structures, but I think you may dynamically generate the > > necessary ones. > > > > I can experiment with this, though one thing is we have no actual idea > what voltages these are supplying...it doesn't look like that matters > from drivers/regulator/fixed.c, but I'd have to try it to be sure. I believe it is likely 1.8v. But I can check if I have the schematics of a reference design for something like this. ... > >> + if (int3472->clock.ena_gpio) { > >> + ret = skl_int3472_register_clock(int3472); > >> + if (ret) > >> + goto out_free_res_list; > >> + } else { > > Hmm... Have I got it correctly that we can't have ena_gpio && led_gpio together? > > > No, just that we can only have led_gpio if we also have ena_gpio (at > least that's the intention...) Okay, perhaps then a comment above? -- With Best Regards, Andy Shevchenko From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26347C2B9F7 for ; Wed, 26 May 2021 07:56:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E64296143C for ; Wed, 26 May 2021 07:56:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E64296143C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DHDjk/tXwiTGISIT3eHBtE/Aglsd6/dAr+Jn3RR3p48=; b=sxEku1NEL8EQsR gphV/heUTbrQyBekumQYCEet62jX6ukVPPeNKrlO4IBSAkA7DqqWOZTFMHxKjTzKHTUQyxfjgwZnP TcZJL9qjDK4d9VH4AcWur+J4QSTYqZV0Oho+YEoTbgJQs2SYep/x+QY6/MMYlNW7yYREiXGEVFcDt ap7CyRKlIMFB+DNg/78aPB1EfG+3pYLEzaNBhOUJwjd79KJ9GX5c0D/bH6eJ+x19ZEe+mMqof7E4M 6KZPmypIg1r+WqR/akD/R4aIyuNRr338bPu4HZKPg0Th+nnS6zdork8Okd9x10ZOfBt+GYhsPTjYZ k3BneqkYVd7ZMLILj/Kw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lloNW-00CFAf-QB; Wed, 26 May 2021 07:54:58 +0000 Received: from mga18.intel.com ([134.134.136.126]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lloNR-00CF8L-LE for linux-arm-kernel@lists.infradead.org; Wed, 26 May 2021 07:54:54 +0000 IronPort-SDR: JrrVLw6sz6zrI2wm3gGbgifq6ZrEODbqLSN0OUD6HHxaP29eMsQ5DNOaHgWW3LGMaeALspCJwW CEvYgcf50O5A== X-IronPort-AV: E=McAfee;i="6200,9189,9995"; a="189782699" X-IronPort-AV: E=Sophos;i="5.82,330,1613462400"; d="scan'208";a="189782699" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 00:54:51 -0700 IronPort-SDR: BOWpYMucKBb3PRHow4HJKfeFxbQ+pJKhFKY5nU+pkjl7zsFefbeEHbETfh1r5dRm5uMGJqIp9W Suf9sRUeo7HA== X-IronPort-AV: E=Sophos;i="5.82,330,1613462400"; d="scan'208";a="464672901" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 00:54:43 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lloND-00EkYe-AH; Wed, 26 May 2021 10:54:39 +0300 Date: Wed, 26 May 2021 10:54:39 +0300 From: Andy Shevchenko To: Daniel Scally Cc: "Rafael J . Wysocki" , Wolfram Sang , Lee Jones , Hans de Goede , Maximilian Luz , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org, platform-driver-x86@vger.kernel.org, devel@acpica.org, Len Brown , Mika Westerberg , Russell King , Linus Walleij , Bartosz Golaszewski , Mark Gross , Robert Moore , Erik Kaneda , laurent.pinchart@ideasonboard.com, kieran.bingham@ideasonboard.com Subject: Re: [PATCH v4 7/8] platform/x86: Add intel_skl_int3472 driver Message-ID: References: <20210520140928.3252671-1-djrscally@gmail.com> <20210520140928.3252671-8-djrscally@gmail.com> <6294177b-d6e1-8bbd-d313-5cce1c498604@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6294177b-d6e1-8bbd-d313-5cce1c498604@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210526_005453_765131_C7448F78 X-CRM114-Status: GOOD ( 23.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 25, 2021 at 11:53:21PM +0100, Daniel Scally wrote: > On 21/05/2021 13:57, Andy Shevchenko wrote: ... > >> +static const struct regulator_ops int3472_gpio_regulator_ops; > > Hmm... Can you use 'reg-fixed-voltage' platform device instead? > > > > One example, although gone from upstream, but available in the tree, I can > > point to is this: > > > > git log -p -- arch/x86/platform/intel-mid/device_libs/platform_bcm43xx.c > > > > It uses constant structures, but I think you may dynamically generate the > > necessary ones. > > > > I can experiment with this, though one thing is we have no actual idea > what voltages these are supplying...it doesn't look like that matters > from drivers/regulator/fixed.c, but I'd have to try it to be sure. I believe it is likely 1.8v. But I can check if I have the schematics of a reference design for something like this. ... > >> + if (int3472->clock.ena_gpio) { > >> + ret = skl_int3472_register_clock(int3472); > >> + if (ret) > >> + goto out_free_res_list; > >> + } else { > > Hmm... Have I got it correctly that we can't have ena_gpio && led_gpio together? > > > No, just that we can only have led_gpio if we also have ena_gpio (at > least that's the intention...) Okay, perhaps then a comment above? -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel