From: "Jean-François Lessard" <jefflessard3@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: "Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
devicetree@vger.kernel.org, linux-leds@vger.kernel.org,
linux-kernel@vger.kernel.org, "Andreas Färber" <afaerber@suse.de>,
"Boris Gjenero" <boris.gjenero@gmail.com>,
"Christian Hewitt" <christianshewitt@gmail.com>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Paolo Sabatino" <paolo.sabatino@gmail.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>
Subject: Re: [PATCH v3 3/4] auxdisplay: Add TM16xx 7-segment LED matrix display controllers driver
Date: Thu, 21 Aug 2025 12:42:21 -0400 [thread overview]
Message-ID: <13E7CEAE-6865-485B-9486-7EBEEE46E285@gmail.com> (raw)
In-Reply-To: <20250821-passionate-mouse-of-essence-2c5af4@kuoka>
Le 21 août 2025 03 h 43 min 51 s HAE, Krzysztof Kozlowski <krzk@kernel.org> a écrit :
>On Wed, Aug 20, 2025 at 12:31:16PM -0400, Jean-François Lessard wrote:
>> +/**
>> + * tm16xx_map_seg7_store() - Sysfs: set 7-segment character map (binary blob)
>> + * @dev: pointer to device
>> + * @attr: device attribute (unused)
>> + * @buf: new mapping (must match size of map_seg7)
>> + * @cnt: buffer length
>> + *
>> + * Return: cnt on success, negative errno on failure
>> + */
>> +static ssize_t tm16xx_map_seg7_store(struct device *dev,
>> + struct device_attribute *attr,
>> + const char *buf, size_t cnt)
>> +{
>> + if (cnt != sizeof(map_seg7))
>> + return -EINVAL;
>> + memcpy(&map_seg7, buf, cnt);
>> + return cnt;
>> +}
>> +
>> +static DEVICE_ATTR(value, 0644, tm16xx_value_show, tm16xx_value_store);
>> +static DEVICE_ATTR(num_digits, 0444, tm16xx_num_digits_show, NULL);
>> +static DEVICE_ATTR(map_seg7, 0644, tm16xx_map_seg7_show, tm16xx_map_seg7_store);
>
>Where did you document the ABI?
>
Currently, there is no formal ABI documentation for the TM16xx sysfs attributes.
While map_seg7 follows existing auxdisplay conventions (which lack ABI docs),
I plan to add TM16xx-specific ABI documentation under
Documentation/ABI/testing/sysfs-class-leds-tm16xx in the v4 submission.
>> +
>> +static struct attribute *tm16xx_main_led_attrs[] = {
>> + &dev_attr_value.attr,
>> + &dev_attr_num_digits.attr,
>> + &dev_attr_map_seg7.attr,
>> + NULL,
>> +};
>> +ATTRIBUTE_GROUPS(tm16xx_main_led);
>> +
>
>...
>
>> +#if IS_ENABLED(CONFIG_I2C)
>> +/**
>> + * tm16xx_i2c_probe() - Probe callback for I2C-attached controllers
>> + * @client: pointer to i2c_client
>> + *
>> + * Return: 0 on success, negative error code on failure
>> + */
>> +static int tm16xx_i2c_probe(struct i2c_client *client)
>> +{
>> + const struct tm16xx_controller *controller;
>> + struct tm16xx_display *display;
>> + int ret;
>> +
>> + controller = i2c_get_match_data(client);
>> + if (!controller)
>> + return -EINVAL;
>> +
>> + display = devm_kzalloc(&client->dev, sizeof(*display), GFP_KERNEL);
>> + if (!display)
>> + return -ENOMEM;
>> +
>> + display->client.i2c = client;
>> + display->dev = &client->dev;
>> + display->controller = controller;
>> +
>> + i2c_set_clientdata(client, display);
>> +
>> + ret = tm16xx_probe(display);
>> + if (ret)
>> + return ret;
>> +
>> + return 0;
>> +}
>> +
>> +/**
>> + * tm16xx_i2c_remove() - Remove callback for I2C-attached controllers
>> + * @client: pointer to i2c_client
>
>Please don't ever add comments, especially kerneldocs, for such obvious
>driver API. This function cannot be anything else than what you
>described. Why? Linux core driver model tells that. You never have to
>repeat what Linux core driver model is...
>
Well received, thank you. I will drop these trivial kernel-doc comments.
>Best regards,
>Krzysztof
>
Best regards,
Jean-François Lessard
next prev parent reply other threads:[~2025-08-21 16:42 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 16:31 [PATCH v3 0/4] auxdisplay: Add TM16xx 7-segment LED matrix display controllers driver Jean-François Lessard
2025-08-20 16:31 ` [PATCH v3 1/4] dt-bindings: vendor-prefixes: Add fdhisi, titanmec, princeton, winrise, wxicore Jean-François Lessard
2025-08-20 20:08 ` Conor Dooley
2025-08-21 19:35 ` Jean-François Lessard
2025-08-21 20:13 ` Conor Dooley
2025-08-22 2:35 ` Jean-François Lessard
2025-08-20 16:31 ` [PATCH v3 2/4] dt-bindings: auxdisplay: add Titan Micro Electronics TM16xx Jean-François Lessard
2025-08-21 7:48 ` Krzysztof Kozlowski
2025-08-21 15:16 ` Jean-François Lessard
2025-08-22 6:44 ` Krzysztof Kozlowski
2025-08-22 13:32 ` Jean-François Lessard
2025-08-20 16:31 ` [PATCH v3 3/4] auxdisplay: Add TM16xx 7-segment LED matrix display controllers driver Jean-François Lessard
2025-08-21 7:43 ` Krzysztof Kozlowski
2025-08-21 16:42 ` Jean-François Lessard [this message]
2025-08-21 8:08 ` Andy Shevchenko
2025-08-21 19:04 ` Jean-François Lessard
2025-08-21 20:19 ` Andy Shevchenko
2025-08-22 2:20 ` Jean-François Lessard
2025-08-22 6:08 ` Andy Shevchenko
2025-08-22 13:50 ` Jean-François Lessard
2025-08-27 5:32 ` kernel test robot
2025-08-20 16:31 ` [PATCH v3 4/4] MAINTAINERS: Add entry for TM16xx driver Jean-François Lessard
2025-08-20 19:08 ` Andy Shevchenko
2025-08-20 19:51 ` Conor Dooley
2025-08-20 20:29 ` Andy Shevchenko
2025-08-21 17:40 ` Conor Dooley
2025-08-21 19:33 ` Andy Shevchenko
2025-08-21 19:35 ` Andy Shevchenko
2025-08-21 20:11 ` Conor Dooley
2025-08-21 20:23 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13E7CEAE-6865-485B-9486-7EBEEE46E285@gmail.com \
--to=jefflessard3@gmail.com \
--cc=afaerber@suse.de \
--cc=andy@kernel.org \
--cc=boris.gjenero@gmail.com \
--cc=christianshewitt@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=hkallweit1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=paolo.sabatino@gmail.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).