On Fri, 2024-03-22 at 06:37 +0100, Krzysztof Kozlowski wrote: > On 22/03/2024 01:32, Lothar Rubusch wrote: > > > > > > + > > > > /* Bail out if max_speed_hz exceeds 5 MHz */ > > > > if (spi->max_speed_hz > ADXL345_MAX_SPI_FREQ_HZ) > > > > return dev_err_probe(&spi->dev, -EINVAL, "SPI CLK, %d Hz > > > > exceeds 5 MHz\n", > > > > spi->max_speed_hz); > > > > > > > > regmap = devm_regmap_init_spi(spi, &adxl345_spi_regmap_config); > > > > - if (IS_ERR(regmap)) > > > > - return dev_err_probe(&spi->dev, PTR_ERR(regmap), "Error > > > > initializing regmap\n"); > > > > + if (IS_ERR(regmap)) { > > > > + dev_err_probe(&spi->dev, PTR_ERR(regmap), "Error initializing > > > > spi regmap: %ld\n", > > > > + PTR_ERR(regmap)); > > > > + return PTR_ERR(regmap); > > > > > > Why are you changing correct code into incorrect? > > > > I'll adjust that. It looks odd, I agree, but is this incorrect code? I found > > similar code in the neighbor adxl313 accel driver. I may change/update > > that then, too. Thank you for the hints. > > Please explain why you are doing this. How is this related to adding SPI > 3-wire mode? > > Yeah... Already asked to separate the refactor from the feature in two different patches. - Nuno Sá