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 9DE41C4708A 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 893B76143C for ; Wed, 26 May 2021 07:54:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232006AbhEZH4X (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-i2c@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