lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fcf3ae9c-37db-4c47-b0d2-800bb24e967d@ideasonboard.com>
Date: Wed, 15 Jan 2025 18:04:40 +0200
From: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>, linux-media@...r.kernel.org,
 linux-kernel@...r.kernel.org, Devarsh Thakkar <devarsht@...com>,
 Jai Luthra <jai.luthra@...asonboard.com>
Subject: Re: [PATCH 16/19] media: i2c: ds90ub960: Enable SSCG for UB9702

On 15/01/2025 16:26, Sakari Ailus wrote:
> Moi,
> 
> On Fri, Jan 10, 2025 at 11:14:16AM +0200, Tomi Valkeinen wrote:
>> From: Jai Luthra <jai.luthra@...asonboard.com>
>>
>> UB9702 supports spread-spectrum clock generation for the back-channel
>> clock, which is futher used by serializers in synchronous mode to
>> generate the forward-channel clock, which can help reduce peak EMI
>> energy. The SSCG is common to all RX ports, so it can only be used if
>> all the ports are in the same mode.
>>
>> Add basic support for SSCG by adding a module parameter to enable the
>> SSCG. The SSCG uses hardcoded configurationg, with 0.5% center-spread at
>> 33kHz modulation rate. See datasheet if different configuration is
>> required.
>>
>> Signed-off-by: Jai Luthra <jai.luthra@...asonboard.com>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
>> ---
>>   drivers/media/i2c/ds90ub960.c | 102 ++++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 102 insertions(+)
>>
>> diff --git a/drivers/media/i2c/ds90ub960.c b/drivers/media/i2c/ds90ub960.c
>> index f6d6c2fe12cd..a534d077f045 100644
>> --- a/drivers/media/i2c/ds90ub960.c
>> +++ b/drivers/media/i2c/ds90ub960.c
>> @@ -52,6 +52,10 @@
>>   #include <media/v4l2-fwnode.h>
>>   #include <media/v4l2-subdev.h>
>>   
>> +static bool ub960_enable_sscg;
>> +module_param_named(enable_sscg, ub960_enable_sscg, bool, 0644);
>> +MODULE_PARM_DESC(enable_sscg, "Enable SSCG (if available)");
> 
> Shouldn't this come from DT instead?

SSCG is an option to use or not to use, based on what the user wants. DT 
should describe the hardware.

A module parameter is bad for this, though, as it's then used for all 
ub960 devices... But I'm not sure what other options we have. We need to 
have it at probe time.

Probably the whole driver could be changed to not connect the 
serializers at probe, but instead would offer a set of userspace APIs to 
enable/disable SSCG, and to enable the links. But that brings in its own 
set of problems, as the links are used for i2c communication to the ser 
and sensor, not to mention new userspace APIs which always complicates 
things.

  Tomi


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ