Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp314714rwb; Wed, 9 Nov 2022 02:55:48 -0800 (PST) X-Google-Smtp-Source: AMsMyM5T/ESbRGuHeijLvTvyStcpdvROry29Ev+RzpwLSc/wCuFU6SxOSANhqJ1mNAOt4UGP7FOQ X-Received: by 2002:a17:907:a2cf:b0:7ad:a693:abf8 with SMTP id re15-20020a170907a2cf00b007ada693abf8mr54624820ejc.137.1667991347773; Wed, 09 Nov 2022 02:55:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667991347; cv=none; d=google.com; s=arc-20160816; b=aI/4JjcSPYq0rP3q7HzqlHcQ6VhUeX+12W1GLKa1ENtIt1EzQlpjgEtcLmU0QWCR/O rrUKvHT8QHMpM/8C13qBrd61hNqxxNIFpIupWAbTM/oGjzcaMZRdB4ioL4yNgrsFwtyO nVk38XsQ7DVz24s97vRakDdD7lzgwblZIB+cHfZUkZUIYIms9e3ZFWT7iL5fMU4sahcQ rwUU0Yjqo08gVwS3c4Qsj0S1vP5xIWXyQaVLjEDYIEvXJzgwZWUKjzWOIfnkzqQKiuLi a3B2mhZkvF9OD+YghgZLG0ODxVUrGBugtWMunMdOOVQpUECxz0dgbYepIOJQUkth+FXV /Huw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=7FBlAiIM54mqWinR7+bib9pgJGN5+DUySSkyM4Jn4R8=; b=jnBnYZeNoIkMYx93psTFXE8Ze0FfgG49/R3ajmbV45p311udWIJeoltFhBzd7lkDt+ /6JKOSgR8A/ZdEWfLS0R0Dj1nTAG6qZWTV8HB+P4+/HV1SrIj5LjLNexMLmRaY6c0Ha1 lM2t9bWLtNHZR/edxAn6jMVCFk3mSCv00P9qyLgb/DLIVOtwl1cC+C1bHYkes8tNvyob x0hN9b1Ds3AnPAh5+13Wlb5BjuGBnEJGqG3VEnMlzOIyWICSOBtY3pHnujsd08ApM6oK cMEfVOqfQCQd08LEBWcMO63mwqJ03HRRKmBxnxZCnti1w9X+AkYEMZK3ffjsX/pqWB5H zeJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bFQK1aWJ; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id tc7-20020a1709078d0700b00779c6c57dbfsi14162893ejc.556.2022.11.09.02.55.26; Wed, 09 Nov 2022 02:55:47 -0800 (PST) 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=@intel.com header.s=Intel header.b=bFQK1aWJ; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229579AbiKIKkQ (ORCPT + 93 others); Wed, 9 Nov 2022 05:40:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229802AbiKIKkP (ORCPT ); Wed, 9 Nov 2022 05:40:15 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 739FB1C10D; Wed, 9 Nov 2022 02:40:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667990414; x=1699526414; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=5bHYyqP5M5DI4ZLT2QWbl6fGoRoL44686dEs/SdCwz0=; b=bFQK1aWJdnVgaD2k3h4NeEcAMbqMD5gmkE62yR6cbvWpOobTKcmYwekw YgbfFRAZNnyqUssYRFbOsbDNjRIUXJnGKxgR/rNUb1bPPEtjsWTVngZfm 1Gk1aJiTrwzC8N6zw3y1CgkSuckFDArH7+you43MTAMBKAC2+/WcgYzYR Vu/m0Srgb5zsl2eWzVd+i3rSGkKkLfGGUD4mVRN2zXk8Y99l56Fv3vhBq vtj6BAk3Hc2r161gKSSpmuf9porbBcjvTIkB69lvCDHS51RjKBln3iXla AXnkKLXsNuOcpUgQA12pZvS3SFAxKo4grqLh7WJne2FXCeRxUiWiaUz26 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10525"; a="298467163" X-IronPort-AV: E=Sophos;i="5.96,150,1665471600"; d="scan'208";a="298467163" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 02:40:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10525"; a="811587922" X-IronPort-AV: E=Sophos;i="5.96,150,1665471600"; d="scan'208";a="811587922" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga005.jf.intel.com with ESMTP; 09 Nov 2022 02:40:11 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1osiV7-009hZ3-29; Wed, 09 Nov 2022 12:40:09 +0200 Date: Wed, 9 Nov 2022 12:40:09 +0200 From: Andy Shevchenko To: Linus Walleij Cc: Mika Westerberg , Hans de Goede , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Thierry Reding , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org Subject: Re: [PATCH v2 6/6] pinctrl: intel: Enumerate PWM device when community has a capabilitty Message-ID: References: <20221108142226.63161-1-andriy.shevchenko@linux.intel.com> <20221108142226.63161-7-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 On Wed, Nov 09, 2022 at 11:08:04AM +0100, Linus Walleij wrote: > On Wed, Nov 9, 2022 at 10:56 AM Andy Shevchenko > wrote: > > On Wed, Nov 09, 2022 at 10:08:51AM +0100, Linus Walleij wrote: ... > > > I guess I can be convinced that this hack is the lesser evil :D > > > > > > What is it in the platform that makes this kind of hacks necessary? > > > > The PWM capability is discoverable by the looking for it in the pin > > control IP MMIO, it's not a separate device, but a sibling (child?) > > of the pin control, that's not a separate entity. > > OK I get it. > > > Moreover, not every pin control _community_ has that capability (capabilities > > are on the Community level and depends on ACPI representation of the > > communities themself - single device or device per community - the PWM may or > > may not be easily attached. > > OK I think I understand it a bit, if ACPI thinks about the PWM > as "some feature of the community" then that is how it is, we have > this bad fit between device tree and Linux internals at times as well, > then spawning a device from another one is the way to go, we need > to consider the option that it is Linux that is weird at times, not the > HW description. The problem here is not the impossibility to do the things. The problem is that things are done and validated on a Windows system. After that it close to impossible to update the firmware or perform any architectural changes. OTOH, announcing the separate device out of the existing MMIO space doesn't sound right from the software point of view that should follow the hardware representation. Ideally, this should be an adaptive MFD-like device, but it makes things even more complicated than has been discussed already. (Note, that some of the pin control drivers are enumerated as platform devices, and that code should also be taken into account) ... > > That said, I agree that this looks not nice, but that's all what > > Mika and me can come up with to make all this as little ugly and > > intrusive as possible. > > I can live with it, rough consensus and running code. > Acked-by: Linus Walleij Thank you! -- With Best Regards, Andy Shevchenko