35,7 +2140,7 @@ static void atmel_set_termios(struct uart_port *port,
> struct ktermios *termios,
> mode |= ATMEL_US_USMODE_HWHS;
> }
> } else {
> - /* RS232 without hadware handshake */
> + /* RS232 without hadwa
.e.
error(r) = abs(1/r_target - 1/r_actual) which minimizes the error in the
time domain and so guarantees the maximal count of matched samples) it
can be proved to result in the right values (assuming no overflow etc.).
As writing formulas in email is cumbersome, see the attachment for a
prove.
R
_rtscts);
> +
> unsigned int mctrl_gpio_get(struct mctrl_gpios *gpios, unsigned int *mctrl)
> {
> enum mctrl_gpio_idx i;
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
...@pengutronix.de>
Fixes: 90ebc4838666 ("serial: imx: repair and complete handshaking")
Acked-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
wise the I2C driver gets loaded without recovery
> mechanisms enabled.
>
> Signed-off-by: Stefan Agner <ste...@agner.ch>
Acked-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König
Hello Fabio,
On Mon, Sep 26, 2016 at 11:13:37AM -0300, Fabio Estevam wrote:
> On Mon, Sep 26, 2016 at 11:09 AM, Uwe Kleine-König
> <u.kleine-koe...@pengutronix.de> wrote:
> > On Mon, Sep 26, 2016 at 03:55:31PM +0200, Sascha Hauer wrote:
> >> The USR2_DCDIN bit is
On Fri, Sep 30, 2016 at 01:04:28PM +0200, Richard Genoud wrote:
> 2016-09-30 11:12 GMT+02:00 Uwe Kleine-König <u.kleine-koe...@pengutronix.de>:
> > Hello Richard,
> >
> > On Fri, Sep 30, 2016 at 10:58:00AM +0200, Richard Genoud wrote:
> >> Commit 1cf6e8fc8
ronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
On Wed, Oct 26, 2016 at 08:47:46AM -0500, Dimitri Sivanich wrote:
> On Wed, Oct 26, 2016 at 02:56:57PM +0200, Uwe Kleine-König wrote:
> > It makes the result hard to interpret correctly if a base 10 number is
> > prefixed by 0x. So change to a hex number.
> >
&g
On Wed, Oct 26, 2016 at 04:35:22PM -0700, Joe Perches wrote:
> On Wed, 2016-10-26 at 14:56 +0200, Uwe Kleine-König wrote:
> > Hello,
> >
> > these were found by
> >
> > git grep -i 0x%[lh]*[du]
> >
> > Maybe it would make sense to catch
ART_GPIO_CTS)
as indicator that the cts mode of the respective pin is used. Is this
reliable? (It's not if there are machines that don't use CTS, neither as
gpio nor using the hardware function.) Maybe this needs a dt property to
indicate that there is no (hw)handshaking available?
> +
* but it will be handled by the driver.
> + */
> mode |= ATMEL_US_USMODE_HWHS;
> + } else {
> + /*
> + * For platforms without FIFO, the flow control is
> + * handled by the driver.
> + */
> + mode |= ATMEL_US_USMODE_NORMAL;
> }
> } else {
> /* RS232 without hadware handshake */
(unrelated to this patch) s/hadware/hardware/
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
doing work in the open for Linux. Please remove and I will be glad to
> reply.
INAL, but from a logical POV: When this mail was sent to a public
mailing list, everyone could consider itself being an "intended
recipient" which would lift all limitations. :-)
Best regards
Uwe
--
Pengutroni
> @@ -0,0 +1,279 @@
> +/*
> + * Device Tree file for the Turris Omnia
> + * Schematic available at https://www.turris.cz/doc/_media/rtrom01-schema.pdf
> + *
> + * Copyright (C) 2016 Uwe Kleine-König <u...@kleine-koenig.org>
> + * Copyright (C) 2016 Tomas Hlavacek <tmshl...@gm
Hello,
On Mon, Oct 24, 2016 at 05:05:26PM +0200, Arnd Bergmann wrote:
> This adds an asm/asm-prototypes.h header for ARM to fix the
> broken symbol versioning for symbols exported from assembler
> files.
>
> In addition to the header, we have to do these other small
> changes:
>
> - move the
On Wed, Nov 23, 2016 at 10:31:13AM +0100, Martin Kaiser wrote:
> Hello Uwe, all,
>
> Thus wrote Uwe Kleine-König (u.kleine-koe...@pengutronix.de):
>
> > For the MX1 which is also supported by this driver, the definitions are
> > right.
>
> ok, understood. I
On 11/23/2016 01:35 AM, Andrew Lunn wrote:
>> +++ b/arch/arm/boot/dts/armada-385-turris-omnia.dts
>> @@ -0,0 +1,279 @@
>> +/*
>> + * Device Tree file for the Turris Omnia
>> + * Schematic available at
>> https://www.turris.cz/doc/_media/rtrom01-schema.pdf
>
> Cool that there is a link to the
Hello,
On Sun, Nov 27, 2016 at 11:14:37PM +0100, Andreas Färber wrote:
> Am 27.11.2016 um 22:25 schrieb Uwe Kleine-König:
> > On Sun, Nov 27, 2016 at 08:37:24PM +0100, Andreas Färber wrote:
> >> Specify the baudrate.
> >>
> >> Fixes: 26ca8b52d6e1 ("ARM: dt
On 11/28/2016 02:17 PM, Andrew Lunn wrote:
>> I still wonder (and didn't get an answer back when I asked about this)
>> why a comment is preferred here. For other devices I know it's usual and
>> requested by the maintainers to use:
>>
>> compatible = "exact name", "earlyer device to match
On Sun, Nov 27, 2016 at 08:37:24PM +0100, Andreas Färber wrote:
> Specify the baudrate.
>
> Fixes: 26ca8b52d6e1 ("ARM: dts: add support for Turris Omnia")
> Cc: Uwe Kleine-König <u...@kleine-koenig.org>
> Signed-off-by: Andreas Färber <afaer...@suse.de>
r...@kaiser.cx>
Acked-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
Hello Andrew,
On Mon, Nov 28, 2016 at 12:10:09AM +0100, Andrew Lunn wrote:
> > Try to see it from my perspective: I see that some vf610 device I don't
> > have (found via `git grep marvell,mv88e6` or so) uses
> > "marvell,mv88e6085". I then assume it has that device on board. How
> > would I know
Hello,
On 11/28/2016 11:52 AM, Andreas Färber wrote:
>> Please don't do this for clearfog - there's changes in the pipeline which
>> completely replace armada-388-clearfog.dts because there's a "base" and
>> "pro" versions of this hardware now, and making such a huge change will
>> effectively
he definitions are
right. So this needs a more sophisticated patch. Also I wonder why the
register definition is in include/linux/platform_data and not in the
driver directly.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
c
[2.144138] mvmdio: Unknown symbol __gnu_mcount_nc (err -22)
...
? If so, this would be great to mention it in the commit log to make
people searching for this issue actually find this patch set.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
On Fri, Oct 28, 2016 at 01:13:31AM +0200, Alexandre Belloni wrote:
> On 27/10/2016 at 20:02:29 +0200, Uwe Kleine-König wrote :
> > Hello Richard,
> >
> > On Thu, Oct 27, 2016 at 06:04:06PM +0200, Richard Genoud wrote:
> > > diff --git a/drivers/tty/serial/atmel
It makes the result hard to interpret correctly if a base 10 number is
prefixed by 0x. So change to a hex number.
Signed-off-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
---
drivers/misc/sgi-gru/grumain.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/d
It makes the message hard to interpret correctly if a base 10 number is
prefixed by 0x. So change to a hex number.
Signed-off-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
---
Hello,
get_maintainer.pl didn't give me a maintainer, so I assumed it's akpm :-)
Uwe
drivers/block/DA
Hello,
these were found by
git grep -i 0x%[lh]*[du]
Maybe it would make sense to catch this type of unconvenience in
checkpatch?
Best regards
Uwe
Uwe Kleine-König (5):
fs: exofs: print a hex number after a 0x prefix
block: DAC960: print a hex number after a 0x prefix
ipack
It makes the result hard to interpret correctly if a base 10 number is
prefixed by 0x. So change to a hex number.
Signed-off-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
---
drivers/ipack/ipack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ipack/ipa
It makes the result hard to interpret correctly if a base 10 number is
prefixed by 0x. So change to a hex number.
Signed-off-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
---
arch/cris/arch-v32/drivers/cryptocop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
It makes the message hard to interpret correctly if a base 10 number is
prefixed by 0x. So change to a hex number.
Signed-off-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
---
fs/exofs/dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/exofs/dir.c b/fs
t;);
did you left this message in three lines on purpose?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
ing device tree.
>
> At the moment, there are no boards using these macros. So it should be
> safe to drop them rather than making them work for both imx1 and imx21,
> which would require a change in the platform data struct.
>
> Signed-off-by: Martin Kaiser <mar...@kaiser.cx>
A
. If however todays most important use case is build coverage,
it's even a disadvantage to make the different configs more uniform.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
ver is called
"stm32f4-i2c", it is used to match "st,stm32f4-i2c" even without
.of_match_table. If this doesn't work, please disregard my question.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
frequency.
> +
> + i2c_dev->dev = >dev;
> +
> + ret = devm_request_threaded_irq(>dev, i2c_dev->irq_event,
> + NULL, stm32f4_i2c_isr_event,
> + IRQF_ONESHOT, pdev->name, i2c_dev);
> + if (ret) {
> + dev_err(>dev, "Failed to request irq %i\n",
> + i2c_dev->irq_error);
That's wrong. Requesting irq_event failed.
> + goto clk_free;
> + }
> +
> + ret = devm_request_threaded_irq(>dev, i2c_dev->irq_error,
> + NULL, stm32f4_i2c_isr_error,
> + IRQF_ONESHOT, pdev->name, i2c_dev);
> + if (ret) {
> + dev_err(>dev, "Failed to request irq %i\n",
> + i2c_dev->irq_error);
> + goto clk_free;
It would also be nice to know for which type of irq this failed. I.e.
please point out if this is the error irq or the event irq in the
message. Ditto for checking the return type of irq_of_parse_and_map.
> + }
> +
> + adap = _dev->adap;
> + i2c_set_adapdata(adap, i2c_dev);
> + snprintf(adap->name, sizeof(adap->name), "STM32 I2C(%pa)", >start);
> + adap->owner = THIS_MODULE;
> + adap->timeout = 2 * HZ;
> + adap->retries = 0;
> + adap->algo = _i2c_algo;
> + adap->dev.parent = >dev;
> + adap->dev.of_node = pdev->dev.of_node;
> +
> + init_completion(_dev->complete);
> +
> + ret = i2c_add_adapter(adap);
> + if (ret)
> + goto clk_free;
> +
> + platform_set_drvdata(pdev, i2c_dev);
> +
> + dev_info(i2c_dev->dev, "STM32F4 I2C driver initialized\n");
This is wrong. The driver is bound now to a device, not initialized.
> +static const struct of_device_id stm32f4_i2c_match[] = {
> + { .compatible = "st,stm32f4-i2c", },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, stm32f4_i2c_match);
> +
> +static struct platform_driver stm32f4_i2c_driver = {
> + .driver = {
> + .name = "stm32f4-i2c",
> + .of_match_table = stm32f4_i2c_match,
Is this needed?
> + },
> + .probe = stm32f4_i2c_probe,
> + .remove = stm32f4_i2c_remove,
> +};
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
m>
> Cc: Richard Zhu <r65...@freescale.com>
> Cc: Sascha Hauer <s.ha...@pengutronix.de>
> Cc: Sudeep Holla <sudeep.ho...@arm.com>
> Cc: Troy Kisky <troy.ki...@boundarydevices.com>
> Cc: Ulf Hansson <ulf.hans...@linaro.org>
> Cc: Uwe Kleine-König <u.
t; Cc: Simon Guinot <simon.gui...@sequanux.org>
> Cc: Stefan Roese <s...@denx.de>
> Cc: Thomas Petazzoni <thomas.petazz...@free-electrons.com>
> Cc: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de
ructure and do the necessary modifications with that one.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
On Wed, Jan 11, 2017 at 02:58:44PM +0100, M'boumba Cedric Madianga wrote:
> Hi Uwe,
>
> 2017-01-11 9:22 GMT+01:00 Uwe Kleine-König <u.kleine-koe...@pengutronix.de>:
> > Hello Cedric,
> >
> > On Thu, Jan 05, 2017 at 10:07:23AM +0100, M'boumba Cedric Madianga wro
atforms. Anyhow, I wonder if
there couldn't be found a better solution.
If in the end it looks like the following that would be good I think:
clk = devm_clk_get(...);
if (IS_ERR(clk))
...
ret = devm_clk_prepare_enable(clk)
if (ret)
return ret;
...
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
On Thu, Jan 12, 2017 at 09:58:23PM +0100, M'boumba Cedric Madianga wrote:
> 2017-01-12 18:49 GMT+01:00 Uwe Kleine-König <u.kleine-koe...@pengutronix.de>:
> > On Thu, Jan 12, 2017 at 02:47:42PM +0100, M'boumba Cedric Madianga wrote:
> >> 2017-01-12 13:03 GMT+01:00 Uwe Klei
ing it ;-)
I'd say +.5 here (where +1 is an ack). My approach would be to push
devm_clk_prepare_enable and use that. It cannot be that hard, can it?
It looks prettier, is well defined, easier to fit into 80 chars per
line. I wonder why not everybody jubilates on this new function.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
Hello Cedric,
On Thu, Jan 12, 2017 at 12:23:12PM +0100, M'boumba Cedric Madianga wrote:
> 2017-01-11 16:39 GMT+01:00 Uwe Kleine-König <u.kleine-koe...@pengutronix.de>:
> > On Wed, Jan 11, 2017 at 02:58:44PM +0100, M'boumba Cedric Madianga wrote:
> >> 2017-01-11 9:22 GM
e (and it's a 1). (But note that this is
irrelevant for the patch as the driver doesn't claim to support this
kind of transfer.)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
in?
AFAICT there are some unaddressed comments that Cedrics claimed to fix
before our discussion was dominated by block transfers.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
gt;base + STM32F4_I2C_CR1;
> + stm32f4_i2c_clr_bits(reg, STM32F4_I2C_CR1_ACK);
> + stm32f4_i2c_set_bits(reg, STM32F4_I2C_CR1_POS);
You could get rid of this, when caching the value of CR1. Would save two
register reads here. This doesn't work for all registers, but it should
be possible to apply for most of them, maybe enough to get rid of the
clr_bits and set_bits function.
> + readl_relaxed(i2c_dev->base + STM32F4_I2C_SR2);
> + break;
> +
> + default:
> + /* N-byte reception: Enable ACK */
> + reg = i2c_dev->base + STM32F4_I2C_CR1;
> + stm32f4_i2c_set_bits(reg, STM32F4_I2C_CR1_ACK);
Do you need to set ACK for each byte transferred?
I stopp reviewing here because of -ENOTIME on my side but don't want to
delay discussion, so sent my comments up to here already now.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
On Thu, Jan 12, 2017 at 02:47:42PM +0100, M'boumba Cedric Madianga wrote:
> 2017-01-12 13:03 GMT+01:00 Uwe Kleine-König <u.kleine-koe...@pengutronix.de>:
> > Hello Cedric,
> >
> > On Thu, Jan 12, 2017 at 12:23:12PM +0100, M'boumba Cedric Madianga wrote:
> >> 2
On Fri, Jul 22, 2016 at 11:00:44AM +0200, Uwe Kleine-König wrote:
> These symbols both don't have a trailing 'S'.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
I just found this patch while rebasing my pending patches. It still
applies and is still correct
Hello Stefan,
On Sun, Dec 04, 2016 at 05:26:58PM -0800, Stefan Agner wrote:
> Since this fixes a kernel freeze, is there a chance to get this still in
> 4.9?
a Fixes:-Line would be nice then.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine
Hello,
On 01/06/2017 11:47 PM, Florian Fainelli wrote:
> On 01/06/2017 02:20 PM, Andrew Lunn wrote:
>>> If one wants to rename an interface, udev rules can be used as usual.
>>
>> Hi Vivien
>>
>> Do you have some examples?
>>
>> A quick look at udevadm info suggests we can use
>>
>>
e current behavior is unchanged, and the optional "label"
> property for user ports has precedence over the enumerated name.
>
> Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com>
Acked-by: Uwe Kleine-König <u...@kleine-koenig.org>
Thanks
Uwe
signature.asc
Description: OpenPGP digital signature
f = (struct cyclonespi_conf *)mgr->priv;
> >> + const char *fw_data = buf;
> >> + const char *fw_data_end = fw_data + count;
> >> +
> >> + while (fw_data < fw_data_end) {
> >> + int ret;
> >> + size_t stride
by the driver.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
; + _ops, conf);
> +}
> +
> +static int cyclonespi_remove(struct spi_device *spi)
> +{
> + fpga_mgr_unregister(>dev);
> +
> + return 0;
> +}
> +
> +static struct spi_driver cyclonespi_driver = {
> + .driver = {
> + .name = "cyclone-ps-spi",
> + .owner = THIS_MODULE,
> + .of_match_table = of_match_ptr(of_ef_match),
> + },
> + .probe = cyclonespi_probe,
> + .remove = cyclonespi_remove,
> +};
I'm not a big fan of aligning the assignment operators. This tends to
get out of sync or results in bigger than necessary changes in follow up
patches. Note that it's out of sync already now, so I suggest to use a
single space before =.
> +
> +module_spi_driver(cyclonespi_driver)
> +
> +MODULE_LICENSE("GPL");
> +MODULE_AUTHOR("Joshua Clayton <stillcompil...@gmail.com>");
> +MODULE_DESCRIPTION("Module to load Altera FPGA firmware over spi");
> --
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
}
> + ret = clk_prepare(i2c_dev->clk);
> + if (ret) {
> + dev_err(i2c_dev->dev, "Failed to prepare clock\n");
> + return ret;
> + }
> +
> + rst = devm_reset_control_get(>dev, NULL);
> + if (IS_ERR(rst)) {
> + dev_err(>dev, "Error: Missing controller reset\n");
> + ret = PTR_ERR(rst);
> + goto clk_free;
> + }
> + reset_control_assert(rst);
> + udelay(2);
> + reset_control_deassert(rst);
> +
> + i2c_dev->speed = STM32F4_I2C_SPEED_STANDARD;
> + ret = of_property_read_u32(np, "clock-frequency", _rate);
> + if (!ret && clk_rate >= 4)
> + i2c_dev->speed = STM32F4_I2C_SPEED_FAST;
> +
> + i2c_dev->dev = >dev;
> +
> + ret = devm_request_irq(>dev, irq_event, stm32f4_i2c_isr_event, 0,
> +pdev->name, i2c_dev);
Starting here this irq might trigger. Can this happen? If so,
stm32f4_i2c_isr_event is called without the adapter being registered.
Probably not an issue as the controller was just reset.
> + if (ret) {
> + dev_err(>dev, "Failed to request irq event %i\n",
> + irq_event);
> + goto clk_free;
> + }
> +
> + ret = devm_request_irq(>dev, irq_error, stm32f4_i2c_isr_error, 0,
> +pdev->name, i2c_dev);
> + if (ret) {
> + dev_err(>dev, "Failed to request irq error %i\n",
> + irq_error);
> + goto clk_free;
> + }
> +
> + adap = _dev->adap;
> + i2c_set_adapdata(adap, i2c_dev);
> + snprintf(adap->name, sizeof(adap->name), "STM32 I2C(%pa)", >start);
> + adap->owner = THIS_MODULE;
> + adap->timeout = 2 * HZ;
> + adap->retries = 0;
> + adap->algo = _i2c_algo;
> + adap->dev.parent = >dev;
> + adap->dev.of_node = pdev->dev.of_node;
> +
> + init_completion(_dev->complete);
> +
> + ret = i2c_add_adapter(adap);
> + if (ret)
> + goto clk_free;
> +
> + platform_set_drvdata(pdev, i2c_dev);
> +
> + dev_info(i2c_dev->dev, "STM32F4 I2C driver registered\n");
> +
> + return 0;
> +
> +clk_free:
> + clk_unprepare(i2c_dev->clk);
> + return ret;
> +}
> +
> +static int stm32f4_i2c_remove(struct platform_device *pdev)
> +{
> + struct stm32f4_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
> +
> + i2c_del_adapter(_dev->adap);
> +
> + clk_unprepare(i2c_dev->clk);
> +
> + return 0;
> +}
> +
> +static const struct of_device_id stm32f4_i2c_match[] = {
> + { .compatible = "st,stm32f4-i2c", },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, stm32f4_i2c_match);
> +
> +static struct platform_driver stm32f4_i2c_driver = {
> + .driver = {
> + .name = "stm32f4-i2c",
> + .of_match_table = stm32f4_i2c_match,
> + },
> + .probe = stm32f4_i2c_probe,
> + .remove = stm32f4_i2c_remove,
> +};
> +
> +module_platform_driver(stm32f4_i2c_driver);
> +
> +MODULE_AUTHOR("M'boumba Cedric Madianga <cedric.madia...@gmail.com>");
> +MODULE_DESCRIPTION("STMicroelectronics STM32F4 I2C driver");
> +MODULE_LICENSE("GPL v2");
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
+ msg->result = -EIO;
> >> + break;
> >> +
> >> + default:
> >> + dev_err(i2c_dev->dev,
> >> + "err it unhandled: status=0x%08x)\n", status);
> >> + return IRQ_NONE;
> >> + }
> >
> > You only check a single irq flag here.
> Yes only the first error could be reported to the i2c clients via
> msg->result that's why I don't check all errors.
> Moreover, as soon as an error occurs, the I2C device is reset.
The the "first" in the comment for __fls is misleading. Also do:
if (status & MOST_IMPORTANT_ERROR) {
...
}
if (status & SECOND_MOST_IMPORTANT_ERROR) {
...
}
(if you need including possible_status stuff).
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
+ };
the second doesn't need the open-drain property? Why?
> + };
> };
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
On Thu, Mar 23, 2017 at 10:32:01AM +0100, Linus Walleij wrote:
> On Mon, Mar 20, 2017 at 12:07 PM, Uwe Kleine-König
> <u.kleine-koe...@pengutronix.de> wrote:
> > Hello Geert,
> >
> > On Mon, Mar 20, 2017 at 11:38:52AM +0100, Geert Uytterhoeven wrote:
> >>
efore drivers had to explicitly ignore -ENOSYS if they want to
> support platforms with and without GPIOLIB. Bad...
Doing things right is sometimes not maximally easy. But that is no
excuse to do it wrong.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
Hello Geert,
On Fri, Mar 24, 2017 at 09:29:02AM +0100, Geert Uytterhoeven wrote:
> On Fri, Mar 24, 2017 at 9:00 AM, Uwe Kleine-König
> <u.kleine-koe...@pengutronix.de> wrote:
> > From: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
> > Subject: [PATCH] gpiod
On Fri, Mar 24, 2017 at 09:59:04AM +0100, Geert Uytterhoeven wrote:
> Hi Uwe,
>
> On Fri, Mar 24, 2017 at 9:39 AM, Uwe Kleine-König
> <u.kleine-koe...@pengutronix.de> wrote:
> > On Fri, Mar 24, 2017 at 09:29:02AM +0100, Geert Uytterhoeven wrote:
> >> On Fri, Ma
Hello Dmitry,
On Thu, Mar 23, 2017 at 12:58:04PM -0700, Dmitry Torokhov wrote:
> On Thu, Mar 23, 2017 at 08:10:20PM +0100, Uwe Kleine-König wrote:
> > On Thu, Mar 23, 2017 at 08:44:41AM -0700, Dmitry Torokhov wrote:
> > > On Thu, Mar 23, 2017 at 07:43:25AM -0700, Dmi
Hello Geert,
On Fri, Mar 24, 2017 at 10:44:50AM +0100, Geert Uytterhoeven wrote:
> On Fri, Mar 24, 2017 at 10:15 AM, Uwe Kleine-König
> <u.kleine-koe...@pengutronix.de> wrote:
> > On Fri, Mar 24, 2017 at 09:59:04AM +0100, Geert Uytterhoeven wrote:
> >> On Fri, Mar 24,
On Thu, Mar 23, 2017 at 01:03:56PM +0100, Geert Uytterhoeven wrote:
> Hi Uwe,
>
> On Thu, Mar 23, 2017 at 12:11 PM, Uwe Kleine-König
> <u.kleine-koe...@pengutronix.de> wrote:
> >> Make sure to enable all drivers and subsystems you need when building
> >> your
On Thu, Mar 23, 2017 at 08:44:41AM -0700, Dmitry Torokhov wrote:
> On Thu, Mar 23, 2017 at 07:43:25AM -0700, Dmitry Torokhov wrote:
> > On Thu, Mar 23, 2017 at 02:41:53PM +0100, Linus Walleij wrote:
> > > On Thu, Mar 23, 2017 at 1:34 PM, Uwe Kleine-König
> > > <
On Thu, Mar 16, 2017 at 04:18:52PM +0100, Linus Walleij wrote:
> On Mon, Mar 6, 2017 at 11:02 AM, Uwe Kleine-König
> <u.kleine-koe...@pengutronix.de> wrote:
> > On Mon, Mar 06, 2017 at 10:53:27AM +0100, Geert Uytterhoeven wrote:
> >> On Mon, Mar 6, 2017 at 10:30 AM, U
$ git grep -e 'ENOSYS' v4.11-rc3 -- Documentation/gpio/
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
Hello Geert,
On Mon, Mar 20, 2017 at 11:38:52AM +0100, Geert Uytterhoeven wrote:
> On Mon, Mar 20, 2017 at 11:31 AM, Uwe Kleine-König
> <u.kleine-koe...@pengutronix.de> wrote:
> > On Mon, Mar 20, 2017 at 10:56:14AM +0100, Geert Uytterhoeven wrote:
> >> Documentation/g
|
> 0 | 11 |
> | BUG:spinlock_lockup_suspected_on_CPU |
> 0 | 11 |
> +--+++
Did someone look into this? For me this looks like a wrong re
return NULL if !CONFIG_GPIOLIB?
No, mctrl_gpio_to_gpiod is right. You are only supposed to call it if
mctrl_gpio_init succeeded.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
to_gpiod() should always return NULL if !CONFIG_GPIOLIB?
> >
> > No, mctrl_gpio_to_gpiod is right. You are only supposed to call it if
> > mctrl_gpio_init succeeded.
>
> Then I have to add checks for sciport->gpios == ERR_PTR(-ENOSYS)...
No, ignoring -ENOSYS is wrong.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
Hello,
Cc += linux-g...@vger.kernel.org
On Sat, Mar 04, 2017 at 04:35:46PM +0100, Geert Uytterhoeven wrote:
> On Fri, Mar 3, 2017 at 8:44 PM, Uwe Kleine-König
> <u.kleine-koe...@pengutronix.de> wrote:
> > On Fri, Mar 03, 2017 at 08:21:05PM +0100, Geert Uytterhoeven wrote:
'don't rely on the OS
> for cleanup' additions ;)
ah, ok. BTW, I like tools that clean up after themselves. This way
debugging is much easier if you look for lost memory. And yes, this
doesn't matter much for short-living programs like i2c-tools, but I like
being consistent here and also do the cleanup for this this type of
program.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
s I2C IP cores as well as Tegra,
> i.MX and AT91.
>
> Signed-off-by: Wolfram Sang <wsa+rene...@sang-engineering.com>
> Cc: Jean Delvare <jdelv...@suse.de>
> Cc: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.d
h (state) {
> + case PARSE_GET_DESC:
> + flags = 0;
> +
> + switch (*arg_ptr++) {
> + case 'r': flags |= I2C_M_RD; break;
This doesn't match kernel coding style and I'd put it on separate lines.
&g
Hello Geert,
On Mon, Mar 06, 2017 at 10:09:50AM +0100, Geert Uytterhoeven wrote:
> On Mon, Mar 6, 2017 at 9:58 AM, Uwe Kleine-König
> <u.kleine-koe...@pengutronix.de> wrote:
> > On Mon, Mar 06, 2017 at 09:49:39AM +0100, Geert Uytterhoeven wrote:
> >> > Given
not break that case.
So it all boils down to the question: Is GPIOLIB=n enough to assume no
gpio is needed?
I'd say it is not.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
Cc += LinusW
On Mon, Mar 06, 2017 at 10:53:27AM +0100, Geert Uytterhoeven wrote:
> On Mon, Mar 6, 2017 at 10:30 AM, Uwe Kleine-König
> <u.kleine-koe...@pengutronix.de> wrote:
> > On Mon, Mar 06, 2017 at 10:09:50AM +0100, Geert Uytterhoeven wrote:
> >> On Mon, Mar 6,
On Mon, Aug 14, 2017 at 08:38:04PM +0200, Clemens Gruber wrote:
> Hello Uwe,
>
> On Mon, Aug 14, 2017 at 08:51:49AM +0200, Uwe Kleine-König wrote:
> > Hello Clemens,
> >
> > On Sun, Aug 13, 2017 at 12:07:56AM +0200, Clemens Gruber wrote:
> > > On Sat, Aug 12,
t;
> Tested on an i.MX6Q board with half-duplex RS-485 and with RS-232.
>
> Cc: Ian Jamison <ian....@arkver.com>
> Cc: Uwe-Kleine König <u.kleine-koe...@pengutronix.de>
> Fixes: 514ab34dbad6 ("serial: imx: Prevent TX buffer PIO write when a
> DMA has been started&qu
Hello Clemens,
On Sun, Aug 13, 2017 at 12:07:56AM +0200, Clemens Gruber wrote:
> On Sat, Aug 12, 2017 at 09:54:51PM +0200, Uwe Kleine-König wrote:
> > On Sat, Aug 12, 2017 at 05:12:10PM +0200, Clemens Gruber wrote:
> > > The imx_transmit_buffer function should return if
t; ret);
> + dev_err(>dev, "SPI_LOOP is not supported by SPI
> master.");
Why two error messages here? What about:
dev_err(>dev, "SPI setup with SPI_LOOP failed (%d)\n", ret);
These lines are > 80 chars, so you should break them.
> + return -ENODEV;
return ret?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
ne directory structure.
Another reason I remember for the prefix thing is that this way the
kernel modules are not named of.ko, core.ko and base.ko. (But this can
be fixed in the Makefile of course with some more prose.)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
return;
> }
> diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
> index bf949a763dbe..e596c5b8f931 100644
> --- a/arch/arm/kernel/topology.c
> +++ b/arch/arm/kernel/topology.c
> @@ -127,8 +127,8 @@ static void __init parse_dt_topology(void)
&
. Arbitration loss is not an error and it shouldn't pollute the
> > kernel log.
> >
>
> I would like to keep it as indication though.
> Agree with dev_warn ?
No, dev_debug is ok.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
ac
> address */
> + u8 offset;
Assuming you rename the property, please adapt the member name here
accordingly.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
> sport is devm_kzalloc()ed, so the variables are initialized to 0 anyway.
I'd agree to Lothar's statement. Did you find this issue by inspection,
or does it fix a compiler warning? Do you think there is an actual
problem?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
spin_unlock(>files_lock);
>
> if (readcnt > 0) {
> - imx_disable_rx_int(sport);
> + imx_disable_rx_int(sport, true);
I wonder if it would be saner to not assign to dma_is_rxing in
imx_disable_
cr2 |= UCR2_CTSC;
> }
>
> +static void imx_stop_rx_dma(struct imx_port *sport);
> +static void imx_stop_tx_dma(struct imx_port *sport);
Is it possible to reshuffle the order of functions to make this forward
declaration redundant?
Best regards
Uwe
--
Pengutronix e.K
the current state?
> + }
> }
>
> static void imx_stop_rx_dma(struct imx_port *sport)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
TEN;
> writel(temp, sport->port.membase + UCR1);
> spin_unlock_irqrestore(>port.lock, flags);
>
> + /* Disable clocks. */
> clk_disable_unprepare(sport->clk_per);
> clk_disable_unprepare(sport->clk_ipg);
> }
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-serial" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
quot;DMA transaction error." is
wrong sometimes and so hide it a bit by using dev_dbg instead of
dev_err.
I don't like that.
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
EN);
You also dropped clearing ATEN without mentioning that in the commit
log. Is this done on purpose?
> - writel(temp, sport->port.membase + UCR2);
> + imx_stop_rx_dma(sport);
> + imx_stop_tx_dma(sport);
>
> imx_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT);
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
Hello Romain,
On Wed, Jul 05, 2017 at 12:14:57PM +0200, Romain Perier wrote:
> Le 03/07/2017 à 08:52, Uwe Kleine-König a écrit :
> > On Fri, Jun 30, 2017 at 02:13:29PM +0200, Lothar Waßmann wrote:
> >> On Fri, 30 Jun 2017 14:04:42 +0200 Romain Perier wrote:
> >>
On Thu, Jul 06, 2017 at 10:31:38AM +0200, Romain Perier wrote:
> Hello,
>
>
> Le 05/07/2017 à 15:29, Uwe Kleine-König a écrit :
> > Hello,
> >
> > On Wed, Jul 05, 2017 at 03:07:01PM +0200, Romain Perier wrote:
> >> From: Nandor Han <nandor@
he more natural place for setting dma_is_rxing to 1 is in
start_rx_dma after all errors are checked.
If you use this, there is nothing left of Nandor Han's patch and you can
drop his authorship.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König
>
> sport->dma_is_enabled = 0;
> --
> 1.8.3.1
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
(!ret && clk_rate >= 40) {
i2c_dev->speed = STM32_I2C_SPEED_FAST;
} else if (!ret && clk_rate >= 10)
i2c_dev->speed = STM32_I2C_SPEED_STANDARD;
else {
dev_err(..., "Unsupported clock speed\n");
return -EINVAL;
}
and I suggest to do this before touching the hardware, i.e. (at least)
above reset_control_assert().
> + i2c_dev->dev = >dev;
> +
> + ret = devm_request_irq(>dev, irq_event, stm32f7_i2c_isr_event, 0,
> +pdev->name, i2c_dev);
> + if (ret) {
> + dev_err(>dev, "Failed to request irq event %i\n",
> + irq_event);
> + goto clk_free;
> + }
> +
> + ret = devm_request_irq(>dev, irq_error, stm32f7_i2c_isr_error, 0,
> +pdev->name, i2c_dev);
> + if (ret) {
> + dev_err(>dev, "Failed to request irq error %i\n",
> + irq_error);
> + goto clk_free;
> + }
> +
> + match = of_match_device(stm32f7_i2c_match, >dev);
> + if (match && match->data)
> + setup = (struct stm32f7_i2c_setup *)match->data;
> + else
> + goto clk_free;
Why do you use this construct if there is only a single compatible that
is supported? This is open coding of_device_get_match_data, an
additional benefit of using this one is that you don't need
stm32f7_i2c_match here which is a precondition to move this down as
suggested above.
> +
> + ret = device_property_read_u32(i2c_dev->dev, "i2c-scl-rising-time-ns",
> +_time);
> + if (!ret)
> + setup->rise_time = rise_time;
> +
> + ret = device_property_read_u32(i2c_dev->dev, "i2c-scl-falling-time-ns",
> +_time);
> + if (!ret)
> + setup->fall_time = fall_time;
> +
> + ret = stm32f7_i2c_setup_timing(i2c_dev, setup);
> + if (ret)
> + goto clk_free;
> +
> + stm32f7_i2c_hw_config(i2c_dev);
> +
> + adap = _dev->adap;
> + i2c_set_adapdata(adap, i2c_dev);
> + snprintf(adap->name, sizeof(adap->name), "STM32F7 I2C(%pa)",
> + >start);
> + adap->owner = THIS_MODULE;
> + adap->timeout = 2 * HZ;
> + adap->retries = 0;
> + adap->algo = _i2c_algo;
> + adap->dev.parent = >dev;
> + adap->dev.of_node = pdev->dev.of_node;
> +
> + init_completion(_dev->complete);
> +
> + ret = i2c_add_adapter(adap);
> + if (ret) {
> + dev_err(>dev, "Failed to add adapter\n");
> + goto clk_free;
> + }
> +
> + platform_set_drvdata(pdev, i2c_dev);
I'd do this earlier. There is no real problem that is fixed, as the only
user is stm32f7_i2c_remove that is only called when stm32f7_i2c_probe
returns success, but it still feels better. Might be subjective, so
ignore at will.
> + clk_disable(i2c_dev->clk);
> +
> + dev_info(i2c_dev->dev, "STM32F7 I2C-%d driver registered\n", adap->nr);
This is wrong. The driver is already registered via
module_platform_driver(stm32f7_i2c_driver);
below. What you want to claim here is, that the driver bound a device.
> +
> + return 0;
> +
> +clk_free:
> + clk_disable_unprepare(i2c_dev->clk);
> +
> + return ret;
> +}
> +
> +static int stm32f7_i2c_remove(struct platform_device *pdev)
> +{
> + struct stm32f7_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
> +
> + i2c_del_adapter(_dev->adap);
> +
> + clk_unprepare(i2c_dev->clk);
> +
> + return 0;
> +}
> +
> +static struct platform_driver stm32f7_i2c_driver = {
> + .driver = {
> + .name = "stm32f7-i2c",
> + .of_match_table = stm32f7_i2c_match,
> + },
> + .probe = stm32f7_i2c_probe,
> + .remove = stm32f7_i2c_remove,
> +};
> +
> +module_platform_driver(stm32f7_i2c_driver);
> +
> +MODULE_AUTHOR("M'boumba Cedric Madianga <cedric.madia...@gmail.com>");
> +MODULE_DESCRIPTION("STMicroelectronics STM32F7 I2C driver");
> +MODULE_LICENSE("GPL v2");
--
Pengutronix e.K. | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/ |
601 - 700 of 2736 matches
Mail list logo