From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E96E82C3259 for ; Thu, 31 Jul 2025 13:28:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753968506; cv=none; b=krcKh7179Bd7vPRJilMnSztPM90rthioVfFJCgLCoU2fvOFP8zFlPbKAQTfVpvCaQXSpI5iE0S2iPdBtZmLQRa7tXla2nkIrNyMszzpGUq7mJRmK3JIvTEPTUl74DY5ul9ZfnthZvH+7n9Ka87zxEEBvGp51Ucb8h/FvH461GlA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753968506; c=relaxed/simple; bh=i9Ok6TMVJzIWF/A/OfsfP1hoZ9qTWvQyujzq0OMG6yc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=chUt/HSCnVJ/DEluzni0E1zEk82LApO9CyHaZrWDnrQC2BkuYC3AwoTlJxynVbor1M7AXQhZtpztyaPG9r1gJlGvW5r4hicrqwnpuyDBhesKH5HljXnsYKubDqXw4fRtgwgfRDiMLSGnCS1OvEIlZ96rXGEoR1qQLEGwzOtluV0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass (2048-bit key) header.d=riscstar-com.20230601.gappssmtp.com header.i=@riscstar-com.20230601.gappssmtp.com header.b=rHju3D5P; arc=none smtp.client-ip=209.85.166.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar-com.20230601.gappssmtp.com header.i=@riscstar-com.20230601.gappssmtp.com header.b="rHju3D5P" Received: by mail-il1-f170.google.com with SMTP id e9e14a558f8ab-3dc9e7d10bdso1519115ab.2 for ; Thu, 31 Jul 2025 06:28:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20230601.gappssmtp.com; s=20230601; t=1753968504; x=1754573304; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=bZXm9ki9DqMqybY0nwzk30YMFU8vNsqP6e+BF0/SCW8=; b=rHju3D5Pb37j/G9lIDCHh+XeufJa9rwOWCrlID2sutADTkYheA7ytCOmm4WDRXqnBf fGb8ijZpzpAI4VUmdNbpE7qR22St5aaJJjd7EyxS2QbdiGxonpdKevDCp45rfJNN7DD7 ZCXOPuBjhxiXfAiGkBlbGARF92lrCGILibrCpHqPpGGtV4c9ccVaBFNHzoY8okB0P9vt GS/5EOdew3C8MW9b5HVMpGQEx7D/jreHMOgTXLI9m7Uv7Xs3de7oEMzZqA4XPSKwqWiH ze6/P3RBzODONwBOWOCVJJTp+K/WmuQiKKbC1kWBOvdt+Sw6TIMC0gTvtfNIz3EjRR+b 3z5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753968504; x=1754573304; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bZXm9ki9DqMqybY0nwzk30YMFU8vNsqP6e+BF0/SCW8=; b=oqHCp0KOoWHeF3qC2XeaLCK8Lr9lXR1/dDFcC09E39VnS2PRRpIalO3ofZRclOwpL+ As1gV8QJCOBG8RTW6Jnp4Elw8GZasa6FOFjtpC07TH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 with SMTP id e9e14a558f8ab-3e3fc323db0mr107094465ab.8.1753968503711; Thu, 31 Jul 2025 06:28:23 -0700 (PDT) Received: from [172.22.22.28] (c-73-228-159-35.hsd1.mn.comcast.net. [73.228.159.35]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3e402b34285sm6538805ab.57.2025.07.31.06.28.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Jul 2025 06:28:23 -0700 (PDT) Message-ID: Date: Thu, 31 Jul 2025 08:28:21 -0500 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v10 2/8] mfd: simple-mfd-i2c: specify max_register To: Lee Jones Cc: lgirdwood@gmail.com, broonie@kernel.org, alexandre.belloni@bootlin.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, mat.jonczyk@o2.pl, dlan@gentoo.org, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr, linux.amoon@gmail.com, troymitchell988@gmail.com, guodong@riscstar.com, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org References: <20250726131003.3137282-1-elder@riscstar.com> <20250726131003.3137282-3-elder@riscstar.com> <20250731131827.GG1049189@google.com> Content-Language: en-US From: Alex Elder In-Reply-To: <20250731131827.GG1049189@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/31/25 8:18 AM, Lee Jones wrote: > On Sat, 26 Jul 2025, Alex Elder wrote: > >> All devices supported by simple MFD use the same 8-bit register 8-bit >> value regmap configuration. There is an option available for a device >> to specify a custom configuration, but no existing device uses it. >> >> Rather than requiring a "full" regmap configuration to be provided to >> change only the max_register value, Lee Jones suggested allowing >> max_register to be specified in the simple_mfd_data structure. The >> 8-bit register 8-bit configuration is still used by default, but >> max_register is also applied if it is non-zero. >> >> If both regmap_config and max_register are provided, the max_register >> field in the regmap_config structure is ignored. >> >> Signed-off-by: Alex Elder >> Suggested-by: Lee Jones >> --- >> v10: - Rename simple_regmap_config() -> simple_regmap_config_get() >> - Introduce simple_regmap_config_put() to free regmap_config >> >> drivers/mfd/simple-mfd-i2c.c | 45 ++++++++++++++++++++++++++++++++---- >> drivers/mfd/simple-mfd-i2c.h | 5 +--- >> 2 files changed, 41 insertions(+), 9 deletions(-) > > This has gone from an in-function 11 line change to 50 lines and the > inclusion of 2 new functions. As much as I _really_ appreciate the time > and effort you have put into this [0], the added complexity being added > here doesn't sit right with me. How would you like to go back to your > v4 idea of providing a bespoke regmap_config for for device? I LOVE this suggestion. I will send v11 shortly and it will be very much like v6 (or something like that). > [0] Beers on me for sending you down this path! I'm looking forward to seeing you again, beer or not. Thanks Lee. -Alex