This commit introduces a NETDEV trigger for named device
activity. Available triggers are link, rx, and tx.
Signed-off-by: Ben Whitten <ben.whit...@gmail.com>
---
.../ABI/testing/sysfs-class-led-trigger-netdev | 45 +++
drivers/leds/trigger/Kconfig | 7 +
d
in the initial submission have been addressed [1].
I am also including the netdev mailing list as it was suggested previously
that if there is no activity the interval will still run and is wasteful
[1] https://lkml.org/lkml/2010/11/14/116
Ben Whitten (1):
leds: trigger: Introduce a NETDEV
From: Ben Whitten <ben.whit...@gmail.com>
This commit introduces a NETDEV trigger for named device
activity. Available triggers are link, rx, and tx.
Signed-off-by: Ben Whitten <ben.whit...@gmail.com>
---
Changes in v2:
Sort includes and redate documentation
Correct licence
From: Ben Whitten <ben.whit...@gmail.com>
The patch was converted to led_blink_oneshot, in doing so we find that the
behaviour has changed. As I dont want to break 'userspace' led behaviour this
patch shouldn't be merged as is. Open to suggestions.
Given an interval of 50ms and heavy thro
Philippe,
On 7 December 2017 at 13:01, Philippe Ombredanne <pombreda...@nexb.com> wrote:
> Ben,
>
> On Thu, Dec 7, 2017 at 12:46 PM, Ben Whitten <ben.whit...@gmail.com> wrote:
>> From: Ben Whitten <ben.whit...@gmail.com>
>>
>> This commit introduces
From: Ben Whitten <ben.whit...@gmail.com>
This commit introduces a NETDEV trigger for named device
activity. Available triggers are link, rx, and tx.
Signed-off-by: Ben Whitten <ben.whit...@gmail.com>
---
Changes in v3:
Cancel the software blink prior to a oneshot re-queue
Changes
On 6 December 2017 at 20:07, Ben Whitten <ben.whit...@gmail.com> wrote:
> Hi Jacek,
>
> On 5 December 2017 at 20:38, Jacek Anaszewski
> <jacek.anaszew...@gmail.com> wrote:
>> Hi Ben,
>>
>> On 12/05/2017 12:19 PM, Ben Whitten wrote:
>>> From: Be
Hi Jacek,
On 5 December 2017 at 20:38, Jacek Anaszewski
<jacek.anaszew...@gmail.com> wrote:
> Hi Ben,
>
> On 12/05/2017 12:19 PM, Ben Whitten wrote:
>> From: Ben Whitten <ben.whit...@gmail.com>
>>
>> The patch was converted to led_blink_oneshot, in doi
gt;> +}\
>> +static DEVICE_ATTR_RW(field);
>
> In order to get rid of this macro and avoid the need for camel case
> macro name we could have one function that would accept an enum e.g.
>
> enum netdev_led_attr {
> NETDEV_ATTR_LINK,
> NETDEV_ATTR_RX,
> NETDEV_ATTR_TX
> };
>
> The function would be called from each sysfs attr callback with the
> related enum, and would alter the state of the related bit.
>
I was aiming for a bit of code de duplication, but it ended up a mess.
Fixed as per your suggestion.
--
Kind regards,
Ben Whitten
No need to check the size of the firmware multiple times, just do it once
in the function responsible for loading as the firmwares are the same size.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 21 +++--
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git
We allow the devres framework handle the clean removal of resources on
teardown of the device, in this case the SPI device, saving lengthy
unwind code and improving clarity.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 87 +++
1 file
Instead of passing around the spi device we instead pass around our
driver data directly.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 305 +++---
1 file changed, 155 insertions(+), 150 deletions(-)
diff --git a/drivers/net/lora/sx1301.c b
nd regmap allocation.
Further registers or fields are added as they are required in conversion.
Signed-off-by: Ben Whitten
---
drivers/net/lora/Kconfig | 1 +
drivers/net/lora/sx1301.c | 46 ++
drivers/net/lora/sx1301.h | 10 ++
3 files changed,
The reads and writes are replaced with regmap versions and unneeded
functions, variable, and defines removed.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 204 +++---
drivers/net/lora/sx1301.h | 30 +++
2 files changed, 95 insertions
Follow the devm model so that we can avoid lengthy unwind code.
Signed-off-by: Ben Whitten
---
drivers/net/lora/dev.c | 28
include/linux/lora/dev.h | 1 +
2 files changed, 29 insertions(+)
diff --git a/drivers/net/lora/dev.c b/drivers/net/lora/dev.c
index
We replace the hard coded numbers for size and version with meaningful
names.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 21 +
drivers/net/lora/sx1301.h | 18 ++
2 files changed, 31 insertions(+), 8 deletions(-)
create mode 100644 drivers/net
We just pass the pointer to firmware down to the function that loads
it.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/lora/sx1301.c b/drivers/net/lora/sx1301.c
index 7324001..3f2a532
> To: Ben Whitten ; Ben
> Whitten
> Cc: starni...@g.ncu.edu.tw; hasnain.v...@arm.com;
> netdev@vger.kernel.org; Xue Liu
> ; Sebastian Heß
>
> Subject: Re: [PATCH lora-next 01/10] net: lora: sx1301: add
> register, bit-fields, and helpers for regmap
>
> + Xue Liu
Like I2C busses SPI devices can also sit behind multiplexers.
This patch adds is based off the I2C implementation and allows
description in the devicetree.
Signed-off-by: Ben Whitten
---
drivers/spi/Kconfig | 10 +++
drivers/spi/Makefile| 3 +
drivers/spi/spi-mux.c | 181
From: Ben Whitten
We convert the AGC calibration function over to regmap and take the
opportunity to make the expected firmware versions defines.
Switch to taking a pointer to our private data.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 101
From: Ben Whitten
As part of standardising on passing our priv data around we convert read
and write burst to take the priv data, there is a small compat step
needed in the old _read and _write functions and will be removed in the
next step.
Signed-off-by: Ben Whitten
---
drivers/net/lora
The last stage in the probe function loads the final firmwares to
the sx1301.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 67 ---
1 file changed, 28 insertions(+), 39 deletions(-)
diff --git a/drivers/net/lora/sx1301.c b/drivers/net
From: Ben Whitten
The register and bit-field definitions are taken from the SX1301
datasheet version 2.01 dated June 2014 with the revision information
'First released version'.
The reset state and RW capability of each field is not reflected in this
patch however from the datasheet:
"
somewhere todo with sx1301_page_read on my hardware.
Since conversion to regmap the sx1301 initialises properly, sx1257 still oopses
because of the SPI bus read but presumably will go away with regmap_bus.
Ben Whitten (10):
net: lora: sx1301: add register, bit-fields, and helpers for regmap
net: lora
From: Ben Whitten
Convert the next layer of read and writes to our private pointer,
once again compatiblity later in the page read and write layer.
The page functions will be removed with this full stack as page switches
are handled by regmap automatically.
Signed-off-by: Ben Whitten
From: Ben Whitten
Keeping change sets small we convert the probe function over to regmap
and regmap_field access for initialisation.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 155 +-
drivers/net/lora/sx1301.h | 7 +++
2 files
From: Ben Whitten
Follow the devm model so that we can avoid lengthy unwind code.
Signed-off-by: Ben Whitten
---
drivers/net/lora/dev.c | 20
include/linux/lora/dev.h | 1 +
2 files changed, 21 insertions(+)
diff --git a/drivers/net/lora/dev.c b/drivers/net/lora/dev.c
From: Ben Whitten
We allow the devres framework handle the clean removal of resources on
teardown of the device, in this case the SPI device, saving lengthy
unwind code and improving clarity.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 87
From: Ben Whitten
As part of changing our internal pointers to our priv data we add the
spi_device temporarily for downstream burst read/writes.
Just pass firmware pointer to the load and remove redundant size checks,
as both MCUs have the same program size add a define.
Use devm_kzalloc
From: Ben Whitten
It's easier to simply add a pointer to our device to our private data,
this way we can avoid passing around our spi_device and instead just
pass private data which is more flexible.
As its a two line change its coupled with converting AGC and ARB ram reads
to regmap functions
On Tue, 7 Aug 2018 at 22:17, Andreas Färber wrote:
>
> Hi Ben,
>
> Am 07.08.2018 um 19:32 schrieb Ben Whitten:
> > Like I2C busses SPI devices can also sit behind multiplexers.
> > This patch adds is based off the I2C implementation and allows
> > description in the
> Subject: Re: [PATCH lora-next 01/10] net: lora: sx1301: add
> register, bit-fields, and helpers for regmap
>
> Am 08.08.2018 um 14:32 schrieb Ben Whitten:
> >>> drivers/net/lora/Kconfig | 1 +
> >>&
On Thu, 9 Aug 2018 at 23:34, Andreas Färber wrote:
>
> Am 09.08.2018 um 14:33 schrieb Ben Whitten:
> > The reads and writes are replaced with regmap versions and unneeded
> > functions, variable, and defines removed.
> >
> > Signed-off-by: Ben Whitten
> > ---
> Subject: Re: [PATCH lora-next 01/10] net: lora: sx1301: add
> register, bit-fields, and helpers for regmap
>
> Am 07.08.2018 um 19:32 schrieb Ben Whitten:
> > diff --git a/drivers/net/lora/sx1301.c
> b/drivers/net/lora/sx1301.c
> > index 5342b61..49958f0 100644
> &
> Subject: Re: [PATCH lora-next 01/10] net: lora: sx1301: add
> register, bit-fields, and helpers for regmap
>
> Am 07.08.2018 um 19:32 schrieb Ben Whitten:
> > From: Ben Whitten
> >
> > The register and bit-field definitions are taken from the
> SX1301
> >
On Thu, 9 Aug 2018 at 21:43, Andreas Färber wrote:
>
> Am 09.08.2018 um 14:33 schrieb Ben Whitten:
> > Instead of passing around the spi device we instead pass around our
> > driver data directly.
> >
> > Signed-off-by: Ben Whitten
> > ---
From: Ben Whitten
We convert to using regmap fields to allow regmap to take care of read
modify writes and bit shifting for ofset fields.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx125x.c | 59 ---
1 file changed, 51 insertions(+), 8
From: Ben Whitten
The 32M is run from the radio, before we just enabled it based on
the radio number but now we can use the clk framework to request the
clk is started when we need it.
The 32M clock produced from the radio is really a gated version of
tcxo which is a fixed clock provided
From: Ben Whitten
We convert to using regmap fields to allow bit access to the registers
where regmap handles the read update write.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 240 +-
drivers/net/lora/sx1301.h | 46 +
2
We can now use to regmap_noinc API to allow reading and writing to
the internal FIFO register which controls processor memory.
We also remove the now defunct spi element from the structure as this
completes the move to regmap.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 22
From: Ben Whitten
We convert to using regmap fields to allow bit access to the registers
where regmap handles the read update write.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 234 +-
drivers/net/lora/sx1301.h | 46 +
2
From: Ben Whitten
We convert to using regmap fields to allow regmap to take care of read
modify writes and bit shifting for ofset fields.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx125x.c | 59 ---
1 file changed, 51 insertions(+), 8
From: Ben Whitten
The 32M is run from the radio, before we just enabled it based on
the radio number but now we can use the clk framework to request the
clk is started when we need it.
The 32M clock produced from the radio is really a gated version of
tcxo which is a fixed clock provided
probed
ip link set lora0 up
sx125x_con spi0.0-b: enabling clkout
Ben Whitten (5):
regmap: Add regmap_noinc_write API
net: lora: sx1301: replace burst spi functions with regmap_noinc
net: lora: sx1301: convert to using regmap fields for bit ops
net: lora: sx125x: convert to regmap fields
net
this additional info down to the lora
portion of the socket, setsockopts?
Thanks,
Ben Whitten
: enabling clkout
Ben Whitten (4):
net: lora: sx1301: convert burst spi functions to regmap raw
net: lora: sx1301: convert to using regmap fields for bit ops
net: lora: sx125x: convert to regmap fields
net: lora: sx125x sx1301: allow radio to register as a clk provider
drivers/net/lora
From: Ben Whitten
We convert to using regmap fields to allow bit access to the registers
where regmap handles the read update write.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 240 +-
drivers/net/lora/sx1301.h | 46 +
2
From: Ben Whitten
The 32M is run from the radio, before we just enabled it based on
the radio number but now we can use the clk framework to request the
clk is started when we need it.
The 32M clock produced from the radio is really a gated version of
tcxo which is a fixed clock provided
As we have caching disabled we can access the regmap using raw for our
firmware reading and writing bursts.
We also remove the now defunct spi element from the structure as this
completes the move to regmap.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx1301.c | 26
From: Ben Whitten
We convert to using regmap fields to allow regmap to take care of read
modify writes and bit shifting for ofset fields.
Signed-off-by: Ben Whitten
---
drivers/net/lora/sx125x.c | 59 ---
1 file changed, 51 insertions(+), 8
> Subject: Re: [PATCH v2 lora-next 1/4] net: lora: sx1301:
> convert burst spi functions to regmap raw
>
> Hi Ben and Mark,
>
> Am 09.10.18 um 14:52 schrieb Ben Whitten:
> > As we have caching disabled we can access the regmap
> using raw for our
> > firmware r
51 matches
Mail list logo