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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b0849f3a-ddd3-4e6a-9f1f-1c5c9ab3e613@bootlin.com>
Date: Wed, 4 Sep 2024 22:38:18 +0200
From: Thomas Bonnefille <thomas.bonnefille@...tlin.com>
To: Jonathan Cameron <jic23@...nel.org>,
 Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Chen Wang <unicorn_wang@...look.com>,
 Inochi Amaoto <inochiama@...look.com>,
 Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt
 <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
 Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
 Miquèl Raynal <miquel.raynal@...tlin.com>,
 linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org
Subject: Re: [PATCH v5 2/3] iio: adc: sophgo-saradc: Add driver for Sophgo
 CV1800B SARADC

Hello, thank you for these fixes, I just wanted to add something below.

Le 03/09/2024 à 9:05 PM, Jonathan Cameron a écrit :
> On Mon, 2 Sep 2024 23:36:59 +0300
> Andy Shevchenko <andy.shevchenko@...il.com> wrote:
> 
>> Thu, Aug 29, 2024 at 02:31:51PM +0200, Thomas Bonnefille kirjoitti:
>>> This adds a driver for the Sophgo CV1800B SARADC.

...

>>> +		init_completion(&saradc->completion);
>>> +		ret = devm_request_irq(&pdev->dev, saradc->irq,
>>> +				       cv1800b_adc_interrupt_handler, 0,
>>> +				       dev_name(&pdev->dev), saradc);
>>> +		if (ret)
>>> +			return ret;
>>> +
>>> +		writel(1, saradc->regs + CV1800B_ADC_INTR_EN_REG);
>>
>> BIT(0)
> 
> Maybe on that - would need to compare with datasheet to know how it's
> described. In theory that might not be a mask.

Indeed, in this case "CV1800B_ADC_INTR_EN_REG" is the register that 
enables the interrupts.
So here what I dis is to set this register to 1 (ON).

> 
>>
>>> +	}
>>> +
>>> +	ret = devm_mutex_init(&pdev->dev, &saradc->lock);
>>> +	if (ret)
>>> +		return ret;
>>
>> + blank line?
> That one I'd done already.
> Anyhow tweaked and pushed out again.
> 
> 
> Jonathan
> 
>>
>>> +	writel(FIELD_PREP(CV1800B_MASK_STARTUP_CYCLE, 15) |
>>> +	       FIELD_PREP(CV1800B_MASK_SAMPLE_WINDOW, 15) |
>>> +	       FIELD_PREP(CV1800B_MASK_CLKDIV, 1) |
>>> +	       FIELD_PREP(CV1800B_MASK_COMPARE_CYCLE, 15),
>>> +	       saradc->regs + CV1800B_ADC_CYC_SET_REG);
>>> +
>>> +	return devm_iio_device_register(&pdev->dev, indio_dev);
>>> +}
>>
> 
Thomas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ