Re: [PATCH 1/3] counter: i8254: Introduce the Intel 8254 interface library module

From: Jarkko Nikula
Date: Tue Jun 20 2023 - 10:04:18 EST


Hi

On 6/8/23 17:43, William Breathitt Gray wrote:
On Sun, Apr 16, 2023 at 01:36:53PM -0400, William Breathitt Gray wrote:
Exposes consumer library functions providing support for interfaces
compatible with the venerable Intel 8254 Programmable Interval Timer
(PIT).

The Intel 8254 PIT first appeared in the early 1980s and was used
initially in IBM PC compatibles. The popularity of the original Intel
825x family of chips led to many subsequent variants and clones of the
interface in various chips and integrated circuits. Although still
popular, interfaces compatible with the Intel 8254 PIT are nowdays
typically found embedded in larger VLSI processing chips and FPGA
components rather than as discrete ICs.

A CONFIG_I8254 Kconfig option is introduced by this patch. Modules
wanting access to these i8254 library functions should select this
Kconfig option, and import the I8254 symbol namespace.

Signed-off-by: William Breathitt Gray <william.gray@xxxxxxxxxx>

I've queued this patch to the counter-next branch of my Counter tree.

Jonathan, Bart, I've created an immutable branch with just this patch
for you to pull which should allow you each to merge the other patch in
this patchset for your respective tree.

I noticed this patch cause in linux-next "Counter support" submenu to disappear and its menu entries are listed directly in "Device Drivers" menu.

Then I wonder why the CONFIG_I8254 has the help text defined since drivers should select it.

Or was the idea something like below?

diff --git a/drivers/counter/Kconfig b/drivers/counter/Kconfig
index bca21df51168..80631b5b0fc6 100644
--- a/drivers/counter/Kconfig
+++ b/drivers/counter/Kconfig
@@ -10,9 +10,10 @@ menuconfig COUNTER
interface. You only need to enable this, if you also want to enable
one or more of the counter device drivers below.

+if COUNTER
+
config I8254
- tristate
- select COUNTER
+ tristate "i8254 interface library"
select REGMAP
help
Enables support for the i8254 interface library functions. The i8254
@@ -25,8 +26,6 @@ config I8254

If built as a module its name will be i8254.

-if COUNTER
-
config 104_QUAD_8
tristate "ACCES 104-QUAD-8 driver"
depends on (PC104 && X86) || COMPILE_TEST