From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (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 B17B41FF7B3 for ; Thu, 18 Sep 2025 12:13:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758197616; cv=none; b=ZiYV/w7WVdyc50elhvfW1htj+e8TgeeMmNuXziI8NvgBCwlJ7orIJ27Jsg4x3Ve/a3tOT5syzjHvDazIOrorVbH6Y7u1lWoMpDVkpHBtQ7i9unmHPysquCn6gF15QnRDH2rg2oCQpDTdG0IUb9STUQvB8qYgwRBm/aTUiKWyra8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758197616; c=relaxed/simple; bh=25e5pCL4VbhmXXIIzWKozI0wi7xaHRTbYhepGZbhCcs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=DW6pgbPinoWqQ+FZVeWap5UK6xH//qI8zHq8Zou3vbEXoRqLJaL89/+PVxpd/JfjcZFBFshrULL/3qMoyYqZv4FuEjOz/OkcGQ0FVilRqmmGg+TIwppH7zhBo/cS0CkEKHnDi2hy05NQE77XDAdZjbiwjh9fr/kLHBeXYjE5uUU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=h5P9nrSJ; arc=none smtp.client-ip=209.85.222.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="h5P9nrSJ" Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-826311c1774so97895785a.2 for ; Thu, 18 Sep 2025 05:13:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758197614; x=1758802414; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=GSUqqFAK/IjUIyoFnj4erBBd1jV7R0LEqUGOnR2YWMc=; b=h5P9nrSJFrcpOfdt2q2bKPDjTMG48gxTn3e1p59D6bDUNKIMpbZ32biteHPdRiYdrK /YPTzXzA3ICA3atprYCpFQk0suu4A/xQ5OdjfoP8wmWW1Izw0ACx9y+kRXtCXH5hmw+d QdEP44FcR3uKspNnXe8hUIoHeYT+eAw8vCbbHvxqUwduR/LCQJ8VaVu5SGvLr/6EtBb9 HwbJwuifnvlX3VxoBmj1DQuYyW0875gjFrSklVYeLJQJ3nnJj4yy64rIedU73hKYEqt7 iKHlZOACQBoL1T1ROBqaHchd7yG/8SxYyBU11UW3u9HTF10QQ7Ci6kYPYLNE8EAJNAwp mHaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758197614; x=1758802414; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GSUqqFAK/IjUIyoFnj4erBBd1jV7R0LEqUGOnR2YWMc=; b=Hf3yKfv59kNsnDbvwaIfDjPJ5U2eijaRth2chArzgI9GxpjG7KESaksr/P4yqTSRvr /B98NjyR/KQIPiunAFjJpUa25URlBOgeVqC8TcanJtHzf8n20aUVKMaKmuydyFAd8QeK klmlHQTtS1OLIYl4ZsX2SsxanaZf46nKaJ+y0B5V6kt7/mhZ64Pp/yvNDaQwbzg7pVlq gRBOLJJdvNbPqzQukwsuUfRFBxBXm0QPdd6eAnlKefOk5ZUPKS10ay1KrFVFoFH2aagD u0P5umC06FWfqQ3+9VMMUzdjhcWqXGZd1W2BM+Fb6c0P7hqrTeqzAXmZLY6JkQVfz/m/ xgOA== X-Gm-Message-State: AOJu0YwO8yRMaa8lqbHckyhuaAirtJFYuhIesC9qjYK7tmkMK/qDoZkU QzQ3YSokqoEp358zu4M0/TO29udQ1/6W97Nj0KqNvSqF4B7BRVmsMM6OCM5s4g== X-Gm-Gg: ASbGncvVEVE4yRKOd3ozWnX8YZm8syN1OwHEjQuSnMeqO6ariOi4z1PQZSjXSVWhuyo 5KQu213e9xtf/SO76pBm04PHO8jRzjR86ZeSlqZe9JmdqnSkUGvVeP8NURob/cb4ZH62LQ3roOV kSXnC+6enM3N2sw0a6oQ1BXHPDyO4RTQgChmsC1BvClY/6yAJs5BBxAV/AzOteu+lR0zNNQ1+ow Uh2g365IQ70jeWXY5v+Qt/ox6BriUYryQCU0vgKnRWrtcRh/Pc8LatqrjRRkzfq434eGUxQFU+t xi0Y41IN2NO75DrUGeYNVv1fNOImolT0x/wiuLFLisvmDX7I1bvZRhNKfT1T3m1tniM32F913FI 1yzGHXj+/0pO7gF//gg3Ey2b+LwIw4uEJdN+ELlZVkFNtbgZmo+PSjyqtn/AdboH3J9ytGpg5fd f7dN67PLB8L40= X-Google-Smtp-Source: AGHT+IEJv4mfuotGcwEe9YFISkDr06QghNUBEdXKeyZEW9Kni+fSkzp6OZ0MxLCfiN8STGfnqdH3Ew== X-Received: by 2002:a05:620a:3182:b0:807:87a9:89a1 with SMTP id af79cd13be357-8310e0c9bf6mr659232585a.37.1758197613460; Thu, 18 Sep 2025 05:13:33 -0700 (PDT) Received: from localhost (modemcable197.17-162-184.mc.videotron.ca. [184.162.17.197]) by smtp.gmail.com with ESMTPSA id af79cd13be357-83630482126sm152726285a.44.2025.09.18.05.13.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Sep 2025 05:13:28 -0700 (PDT) From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Lessard?= To: Andy Shevchenko , Geert Uytterhoeven Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2 0/5] auxdisplay: linedisp: support attribute attachment to auxdisplay devices Date: Thu, 18 Sep 2025 08:13:10 -0400 Message-ID: <20250918121321.116248-1-jefflessard3@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This series modernizes the auxdisplay line display (linedisp) library to enable seamless integration with auxdisplay parent devices while maintaining backward compatibility. The key improvement is adding attach/detach APIs that allow linedisp sysfs attributes to be bound directly to their parent auxdisplay devices avoiding child device proliferation and enabling a uniform 7-segment userspace interface across different driver architectures. This series introduces attachment infrastructure for linedisp devices. The first consumer of this API will be the TM16XX driver series. See the related patch series: auxdisplay: Add TM16xx 7-segment LED matrix display controllers driver Changes include: 1. Encapsulate container_of() usage with to_linedisp() helper function for cleaner context retrieval 2. Improve message display behavior with static padding when message length is smaller than display width 3. Add 'num_chars' read-only attribute for userspace capability discovery 4. Add attach/detach API for sysfs attributes binding to parent devices 5. Document all linedisp sysfs attributes in ABI documentation All existing linedisp_register() users remain unaffected. The new APIs enable drivers like TM16XX to integrate 7-segment functionality within their LED class device hierarchy while providing a uniform 7-segment API. Thanks to Andy Shevchenko for early feedback and guidance. V1 changelog: - Remove should_scroll() check in linedisp_scroll() - Keep attributes sorted alphabetically - Document, invert logic and rename owns_device to direct - Document linedisp_attach()/_register() must be freed by their respective APIs after use - Change call order of display default message and add attributes to prevent racy userspace condition - Separate delete_attachment() call from linedisp variable declaration - Document existing attributes separately, in the first patch RFC changelog: - Replace scope_guard() with guard()() for synchronized list operations. - Replace NULL assignments with proper list_entry_is_head() pattern. - Clearly document why introducing the attach/detach APIs. - Split in patch series, each patch containing a specific change. - Implement static (non-scrolling) display for short messages. - Document exisiting and new ABI sysfs attributes. Jean-François Lessard (5): docs: ABI: auxdisplay: document linedisp library sysfs attributes auxdisplay: linedisp: encapsulate container_of usage within to_linedisp auxdisplay: linedisp: display static message when length <= display size auxdisplay: linedisp: add num_chars sysfs attribute auxdisplay: linedisp: support attribute attachment to auxdisplay devices .../ABI/testing/sysfs-auxdisplay-linedisp | 90 +++++++ drivers/auxdisplay/line-display.c | 240 ++++++++++++++++-- drivers/auxdisplay/line-display.h | 4 + 3 files changed, 312 insertions(+), 22 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-auxdisplay-linedisp -- 2.43.0