From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0B3FEAD2; Tue, 5 Nov 2024 14:49:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730818193; cv=none; b=X/Wb+BbJu/nrbHW8T2fLDP9bV2m+RbO+vcXHw7i83SQ4ymNWbape7U48OKVcqTLui2LsPA8I3GgVVAtSWcSWTzGO1StTnht5yLNp0kAgExIOLANjtJgWfHQSOFn5bVDXqGV7mYu9J83vVu8pFpOUrUTeQV9Ci5wvl9hQBLbheKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730818193; c=relaxed/simple; bh=eVgItqG+GImhCC0U26TnBXZER+rPehddUZBS6jR1FGc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LlETE0laT7B84rdgCVC1sCX7qJJfF72nfkWOkSiYE3gcKWeiLhm4jLBFkcpYU4JuHSx0YuTYxWqxgXA25xTleBKB6YHF5c6wv7+mM7pzbaGwpgL4Qqy585/muQqAcPy/XPjx/+7P531uVJOqgof67z3du/98dO49m63Q8FK6Dzk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=fail smtp.mailfrom=kernel.org; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=kernel.org X-CSE-ConnectionGUID: p4mkdtaFQhWYdgWW8t6etw== X-CSE-MsgGUID: 7sGRTnRgTyy+bkxlvMmWuQ== X-IronPort-AV: E=McAfee;i="6700,10204,11246"; a="34354559" X-IronPort-AV: E=Sophos;i="6.11,260,1725346800"; d="scan'208";a="34354559" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2024 06:49:52 -0800 X-CSE-ConnectionGUID: lluOpqQhSSSA9uNkzDRNfg== X-CSE-MsgGUID: 3TQ5IxQWSI2uPWt4rP1zNw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="88833322" Received: from smile.fi.intel.com ([10.237.72.154]) by orviesa003.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2024 06:49:48 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.98) (envelope-from ) id 1t8KsK-0000000BR9F-1Uni; Tue, 05 Nov 2024 16:49:44 +0200 Date: Tue, 5 Nov 2024 16:49:44 +0200 From: Andy Shevchenko To: Marek =?iso-8859-1?Q?Beh=FAn?= Cc: Lee Jones , Pavel Machek , linux-leds@vger.kernel.org, Arnd Bergmann , soc@kernel.org, Gregory CLEMENT , arm@kernel.org, Hans de Goede , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Andrew Lunn , Sebastian Hesselbarth , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org Subject: Re: [PATCH leds v5 02/12] leds: turris-omnia: Use command execution functions from the MCU driver Message-ID: References: <20241104141924.18816-1-kabel@kernel.org> <20241104141924.18816-3-kabel@kernel.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Tue, Nov 05, 2024 at 10:07:51AM +0100, Marek Behún wrote: > On Mon, Nov 04, 2024 at 04:51:24PM +0200, Andy Shevchenko wrote: > > On Mon, Nov 04, 2024 at 03:19:14PM +0100, Marek Behún wrote: ... > > I'm wondering why the MCU driver (and node) is not represented as syscon > > (with some regmap beneath it). > > > > In such a case it would be something like > > > > foo = syscon_regmap_lookup_by_compatible(); > > > > here instead of all these dances. > > Hi Andy, > > the MCU interface is command-reply oriented. It is incompatible with > regmap. I'm not sure I understand the impediment here. There are plenty of hardware that uses the similar approach and well compatible with regmap (assuming custom ->read*() / ->write*() callbacks)... > I investigated this back in 2019 and explained to Jacek why it > is not possible, but can't find the e-mail on mailing lists, so I am > attaching it. ...but I'm not insisting you to revisit this right now, just maybe you can think more about this again at some point. > So regmap is most probably not possible, unless things changed. > > It is possible to add MCU node to the DT binding and find the device > that way. But if the device-tree does not contain the MCU node, the > driver would still have to fall back to this dance, for backwards > compatibility. Otherwise it would not be able to determine whether gamma > correction is supported with old device tree, as it does currently. > > I guess I could break backwards compatibility with old device tree with > this small feature. I don't think there are any users that don't use > TurrisOS, do upgrade the kernel, but don't upgrade the device-tree... -- With Best Regards, Andy Shevchenko