[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a5c0c73-0d80-bbd0-b53b-522e2f3e936e@axis.com>
Date: Fri, 13 Dec 2024 13:39:01 +0800
From: Hermes Zhang <chenhuiz@...s.com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Guenter Roeck <linux@...ck-us.net>
Cc: Hermes Zhang <Hermes.Zhang@...s.com>, jdelvare@...e.com, robh@...nel.org,
krzk+dt@...nel.org, conor+dt@...nel.org, kernel@...s.com,
linux-kernel@...r.kernel.org, linux-hwmon@...r.kernel.org,
Jonathan Cameron <jic23@...nel.org>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>
Subject: Re: [PATCH 2/2] hwmon: Add support for D3-323-AA Pyroelectric IR
sensor
Hi
On 2024/12/13 0:59, Jonathan Cameron wrote:
> On Wed, 11 Dec 2024 22:17:49 -0800
> Guenter Roeck <linux@...ck-us.net> wrote:
>
>> Hi,
>>
>> On 12/11/24 20:24, Hermes Zhang wrote:
>>> Add support for Nicera D3-323-AA Pyroelectric IR sensor. The sensor
>>> support to config the threshold/filter_type/filter_step and return the
>>> detect result in sysfs attribute.
>>>
>>> Signed-off-by: Hermes Zhang <Hermes.Zhang@...s.com>
>>> ---
>>>
>> ...
>>
>>> +
>>> +static DEVICE_ATTR_WO(pir_threshold);
>>> +static DEVICE_ATTR_WO(pir_filter_step);
>>> +static DEVICE_ATTR_WO(pir_filter_type);
>>> +static DEVICE_ATTR_RO(pir_detector);
>>> +
>>> +static struct attribute *d3323aa_attrs[] = {
>>> + &dev_attr_pir_threshold.attr,
>>> + &dev_attr_pir_filter_step.attr,
>>> + &dev_attr_pir_filter_type.attr,
>>> + &dev_attr_pir_detector.attr,
>>> + NULL,
>>> +};
>>> +
>>> +ATTRIBUTE_GROUPS(d3323aa);
>>> +
>> I don't know what this is, but it is most definitely not a hardware
>> monitoring device. I don't see a definition of those attributes,
>> so I have no idea what they represent.
>>
>> Maybe this is an iio device, but given the unusual attributes
>> I am not even sure about that. Jonathan, any thoughts ?
> New type of sensor, but sure could be in IIO.
>
> Seems mostly a human presence sensor. Not that different from some
> types of proximity sensor and indeed that might be the path to take
> here.
>
> Taking a quick look at the driver suggests there is lots more information
> needed to understand the ABI. At very least needs ABI docs so we can
> discuss how that is generalized. So if submitting an IIO driver
> I want to see
> Documenation/ABI/testing/sysfs-bus-iio-xxxx
> with significant detail. The datasheet provides no where near enough
> info.
>
> Jonathan
Thanks for your suggestions. For the new sensor, it seems require three
attributes, e.g. /sys/bus/iio/devices/iio:deviceX/in_threshold
(in_filter_step, in_filter_type), then one data to indicate if it is
been triggerred (bool), but I'm not sure what is sutible IIO type could
it used? Do you have any suggestion?
Best Regards,
Hermes
Powered by blists - more mailing lists