Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-16 Thread Tudor.Ambarus
On 12/15/20 4:24 PM, Geert Uytterhoeven wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > Hi Mark, Tudor, Hi, Geert, > > On Fri, Dec 11, 2020 at 8:02 PM Mark Brown wrote: >> On Wed, 9 Dec 2020 19:35:14 +0200, Tudor Ambarus wrote: >>>

Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-15 Thread Geert Uytterhoeven
Hi Mark, Tudor, On Fri, Dec 11, 2020 at 8:02 PM Mark Brown wrote: > On Wed, 9 Dec 2020 19:35:14 +0200, Tudor Ambarus wrote: > > Make sure the max_speed_hz of spi_device does not override > > the max_speed_hz of controller. > > Applied to > >

Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-11 Thread Mark Brown
On Wed, 9 Dec 2020 19:35:14 +0200, Tudor Ambarus wrote: > Make sure the max_speed_hz of spi_device does not override > the max_speed_hz of controller. Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/1] spi: Limit the spi device max speed to

Re: Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-10 Thread Mark Brown
On Thu, Dec 10, 2020 at 04:32:02PM +, tudor.amba...@microchip.com wrote: > On 12/10/20 5:33 PM, Mark Brown wrote: > > It does work for now but it'd be nicer if we were doing this through > > recording the decision on the transfer. > Ok, we can drop the patch, as nobody complained about this

Re: Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-10 Thread Tudor.Ambarus
On 12/10/20 5:33 PM, Mark Brown wrote: > On Thu, Dec 10, 2020 at 08:58:18AM +, tudor.amba...@microchip.com wrote: >> On 12/9/20 10:30 PM, Serge Semin wrote: > >> Right, in general we aim to do this sort of fixup on the transfers >> and messages rather than the devices, I guess we

Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-10 Thread Mark Brown
On Thu, Dec 10, 2020 at 08:58:18AM +, tudor.amba...@microchip.com wrote: > On 12/9/20 10:30 PM, Serge Semin wrote: > Right, in general we aim to do this sort of fixup on the transfers > and messages rather than the devices, I guess we might be missing > validation in some of

Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-10 Thread Tudor.Ambarus
Hi, Serge, Mark, On 12/9/20 10:30 PM, Serge Semin wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On Wed, Dec 09, 2020 at 08:25:52PM +, Mark Brown wrote: >> On Wed, Dec 09, 2020 at 11:15:35PM +0300, Serge Semin wrote: >>> On Wed, Dec

Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-09 Thread Serge Semin
On Wed, Dec 09, 2020 at 08:25:52PM +, Mark Brown wrote: > On Wed, Dec 09, 2020 at 11:15:35PM +0300, Serge Semin wrote: > > On Wed, Dec 09, 2020 at 07:54:20PM +, Mark Brown wrote: > > > > Right, in general we aim to do this sort of fixup on the transfers > > > and messages rather than the

Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-09 Thread Mark Brown
On Wed, Dec 09, 2020 at 11:15:35PM +0300, Serge Semin wrote: > On Wed, Dec 09, 2020 at 07:54:20PM +, Mark Brown wrote: > > Right, in general we aim to do this sort of fixup on the transfers > > and messages rather than the devices, I guess we might be missing > > validation in some of the

Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-09 Thread Serge Semin
On Wed, Dec 09, 2020 at 07:54:20PM +, Mark Brown wrote: > On Wed, Dec 09, 2020 at 10:46:36PM +0300, Serge Semin wrote: > > > On Wed, Dec 09, 2020 at 07:35:14PM +0200, Tudor Ambarus wrote: > > > > Make sure the max_speed_hz of spi_device does not override > > > the max_speed_hz of controller.

Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-09 Thread Mark Brown
On Wed, Dec 09, 2020 at 10:46:36PM +0300, Serge Semin wrote: > On Wed, Dec 09, 2020 at 07:35:14PM +0200, Tudor Ambarus wrote: > > Make sure the max_speed_hz of spi_device does not override > > the max_speed_hz of controller. > I have doubts that's right thing to do. It seems better to let > the

Re: [PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-09 Thread Serge Semin
Hello Tudor, On Wed, Dec 09, 2020 at 07:35:14PM +0200, Tudor Ambarus wrote: > Make sure the max_speed_hz of spi_device does not override > the max_speed_hz of controller. I have doubts that's right thing to do. It seems better to let the controller driver to handle the speed clamping itself,

[PATCH] spi: Limit the spi device max speed to controller's max speed

2020-12-09 Thread Tudor Ambarus
Make sure the max_speed_hz of spi_device does not override the max_speed_hz of controller. Signed-off-by: Tudor Ambarus --- drivers/spi/spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index cd3c395b4e90..51d7c004fbab 100644 ---