Re: [PATCH v3] staging: pi433: replace simple switch statements

2018-06-25 Thread marcus . wolf
Hi Dan, I'd like to mention once more, that the idea of the abstraction was to support multiple modules of Hope-RF. If the decision of the "team" of developer of this driver is, that it should be reduced to a Pi433 or RFM69CW driver only, I fully agree, that the abstraction layer isn't necessar

Re: [PATCH v3] staging: pi433: replace simple switch statements

2018-06-25 Thread marcus . wolf
Reviewed-by: Marcus Wolf Thank you Valentin, very nice patch :-) Valentin Vidic schrieb am 24.06.2018 18:31: Use const array to map switch cases to resulting values. Signed-off-by: Valentin Vidic --- v2: use correct type for const arrays v3: add missing static keyword for af_map drivers

Re: pi433: initialization of tx config in pi433_open()

2018-06-22 Thread Marcus Wolf
Hi Hugo, thank you for all your work on Pi433 driver. For a better understanding some info about Pi433 and the ideas behind it. Pi433 was developed by me in order to have a simple to mount CE-compliant 433MHz shield for the Raspberry Pi. I wanted to put it on sale on the one side and develop a fu

Re: rf69_set_deviation in rf69.c (pi433 driver)

2018-06-19 Thread Marcus Wolf
Hi Hugo, sorry for the late response and thank you for all that deep investigation in the pi433 driver! > According to the datasheet[0], the deviation should always be smaller > than 300kHz, and the following equation should be respected: > > (1) FDA + BRF/2 =< 500 kHz > > Why did you choose

Re: [PATCH v2] staging: pi433: cleanup tx_fifo locking

2018-04-19 Thread Marcus Wolf
Reviewed-by: Marcus Wolf Am 19.04.2018 um 12:25 schrieb Valentin Vidic: > pi433_write requires locking due to multiple writers. After acquiring > the lock check if enough free space is available in the kfifo to write > the whole message. This check should prevent partial writes to tx_

Re: [PATCH] staging: pi433: add descriptions for mutex locks

2018-04-19 Thread Marcus Wolf
Hi! So if you like, give me your address, and I'll send you two development samples of Pi433. Cheers, Marcus Am 19.04.2018 um 11:47 schrieb Valentin Vidic: > On Thu, Apr 19, 2018 at 11:25:19AM +0200, Marcus Wolf wrote: >> let me know, what you like to have. For sure with just o

Re: [PATCH] staging: pi433: add descriptions for mutex locks

2018-04-19 Thread Marcus Wolf
Am 12.04.2018 um 20:46 schrieb Valentin Vidic: > On Sun, Apr 08, 2018 at 05:22:46PM +0200, Marcus Wolf wrote: >> Regarding your patch, I did not understand, why you did not remove >> the mutex_lock in pi433_write. Wasn't it the goal to remove it? > > Is it possible f

Re: [PATCH] staging: pi433: add descriptions for mutex locks

2018-04-19 Thread Marcus Wolf
Am 12.04.2018 um 19:15 schrieb Valentin Vidic: > On Sun, Apr 08, 2018 at 04:15:30PM +0200, Marcus Wolf wrote: >> The hardware of Pi433 is working with every Raspberry Pi (on zero, you >> need to solder the GPIO-pins) and with several other fruits like banana >> pi. The on

Re: [PATCH] staging: pi433: add descriptions for mutex locks

2018-04-08 Thread Marcus Wolf
dev, "write: generated new msg with %d bytes.", copied); return 0; } Hope this helps :-) Marcus Am 25.03.2018 um 15:09 schrieb Valentin Vidic: > On Sun, Mar 25, 2018 at 03:00:09PM +0200, Marcus Wolf wrote: >> Unfortunaly I can't find the time to have a closer lo

Re: [PATCH] staging: pi433: add descriptions for mutex locks

2018-04-08 Thread Marcus Wolf
Am 25.03.2018 um 16:24 schrieb Valentin Vidic: > On Sun, Mar 25, 2018 at 03:12:52PM +0200, Marcus Wolf wrote: >> I am not at home the next two weeks. So I can do a codereading on >> Easter, but testing will not take place earlier then mid/end of April :-( >> >> I

Re: [PATCH] staging: pi433: add descriptions for mutex locks

2018-03-25 Thread Marcus Wolf
On Sun, Mar 25, 2018 at 03:00:09PM +0200, Marcus Wolf wrote: >> Unfortunaly I can't find the time to have a closer look on the code this >> weekend - still busy with tax stuff :-( >> >> Idea sounds great. I'll try to look at the code and think about it >> duri

Re: [PATCH] staging: pi433: add descriptions for mutex locks

2018-03-25 Thread Marcus Wolf
about it during Easter hollidays. Cheers, Marcus -- Smarthome-Wolf UG (haftungsbeschränkt) Helene-Lange-Weg 23 80637 München Amtsgericht München, HRB 223529 Umastzsteuer-ID: DE304719911 Geschäftsführer: Marcus Wolf ___ devel maili

Re: [PATCH] staging: pi433: add descriptions for mutex locks

2018-03-23 Thread Marcus Wolf
AM +0100, Marcus Wolf wrote: >> could you please decribe in short words, why you think, that hte lock >> isn't obsolete? >> >> I wasn't sure, but close to remove the lock. That's why I putted the >> comment. > > Sure, if pi433_tx_thread runs on one

Re: [PATCH] staging: pi433: add descriptions for mutex locks

2018-03-23 Thread Marcus Wolf
intrx_position; > - struct mutexrx_lock; > + struct mutexrx_lock; /* serialize read requests */ > wait_queue_head_t rx_wait_queue; > > /* fifo wait queue */ > -- Smarthome-Wolf UG (haftungsbeschränk

Re: [PATCH] staging: pi433: remove unnecessary parentheses

2018-01-10 Thread marcus . wolf
Joe Perches schrieb am 10.01.2018 10:05: > On Wed, 2018-01-10 at 09:44 +0100, Greg Kroah-Hartman wrote: > > On Tue, Jan 09, 2018 at 11:42:16AM -0800, Joe Perches wrote: > > > if (a == b && c == d) > > > is pretty trivial. > > > > But again, don't do that. > > We disagree. Life goes on. > > cheer

Re: [PATCH] staging: pi433: Cleanup codestyle, indent statements after case labels

2018-01-09 Thread Marcus Wolf
Am 09.01.2018 um 21:04 schrieb Valentin Vidic: > On Sun, Dec 24, 2017 at 02:42:57PM +0100, Marcus Wolf wrote: >>> int rf69_set_dagc(struct spi_device *spi, enum dagc dagc) >>> { >>> switch (dagc) { >>> - case normalMode: retur

Re: [PATCH] staging: pi433: Cleanup codestyle, indent statements after case labels

2017-12-24 Thread Marcus Wolf
Am 24.12.2017 um 04:38 schrieb Michael Panzlaff: > To be applied on: > git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git > Branch: > staging-next > > This patch changes the indentation of the statements after case labels. > The linux coding guidelines do not explicitly mentiond th

[PATCH] Staging: Pi433: Bugfix for wrong argument for sizeof() in TX thread

2017-12-18 Thread Marcus Wolf
sizeof(array) != sizeof(pointer to array) Fixes: "staging: pi433: reduce stack size in tx thread" Signed-off-by: Marcus Wolf --- drivers/staging/pi433/pi433_if.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/staging/pi433/pi433_if.c

Re: [PATCH 6/6] staging: pi433: Rename enum modShaping in rf69_enum.h

2017-12-17 Thread Marcus Wolf
Am 04.12.2017 um 21:18 schrieb Dan Carpenter: On Mon, Dec 04, 2017 at 08:59:35PM +0200, Marcus Wolf wrote: Am 04.12.2017 um 12:33 schrieb Dan Carpenter: On Sun, Dec 03, 2017 at 04:17:26PM +0100, Simon Sandström wrote: diff --git a/drivers/staging/pi433/pi433_if.h b/drivers/staging/pi433

rf69_get_lna_gain

2017-12-14 Thread Marcus Wolf
Hi! This is an information for all of you, doing experiments with real hardware! I wanted to explain, what this lna_gain stuff is used for: If you are receiving messages from different sender (let's say several thermometers), it may happen (e. g. due to different distance and different batter

Re: [PATCH 6/8 v3] staging: pi433: use defines for shifting register values

2017-12-13 Thread Marcus Wolf
Am 13.12.2017 um 19:44 schrieb Valentin Vidic: Avoid shifting by magic numbers and use defines instead. Signed-off-by: Valentin Vidic --- v2: - drop change for SHIFT_DATAMODUL_MODULATION_TYPE - move shifting to the header file v3: - drop auto case - use CURRENT suffix - precomp

Re: [PATCH 6/8 v2] staging: pi433: use defines for shifting register values

2017-12-13 Thread Marcus Wolf
Am 13.12.2017 um 18:55 schrieb Valentin Vidic: Avoid shifting by magic numbers and use defines instead. Signed-off-by: Valentin Vidic --- v2: - drop change for SHIFT_DATAMODUL_MODULATION_TYPE - move shifting to the header file drivers/staging/pi433/rf69.c | 16 --

Re: [PATCH 6/8] staging: pi433: use defines for shifting register values

2017-12-13 Thread Marcus Wolf
_GAIN0x07 +#define SHIFT_LNA_CURRENT_GAIN3 #define LNA_GAIN_AUTO0x00 /* default */ #define LNA_GAIN_MAX 0x01 -- Smarthome-Wolf UG (haftungsbeschränkt) Helene-Lange-Weg 23 80637 München Amtsgericht München, HRB 223529 Umastzs

Re: [PATCH 4/8] staging: pi433: add parentheses to mask and shift

2017-12-13 Thread Marcus Wolf
N_AUTO: return automatic; case LNA_GAIN_MAX: return max; case LNA_GAIN_MAX_MINUS_6: return maxMinus6; -- Smarthome-Wolf UG (haftungsbeschränkt) Helene-Lange-Weg 23 80637 München Amtsgericht München, HRB 223529 Umastzsteuer-ID: DE304719911 Geschäftsführer: M

Re: first try to send data with pi433 on Raspberry Pi

2017-12-11 Thread Marcus Wolf
Am 11.12.2017 um 20:40 schrieb Oliver Graute: Hello list, I just got my pi433 working somehow on Raspberry Pi Model B Rev 2. Here are my findings: first I need to enabling spi in config.txt on boot partition. dtparam=spi=on then adding this node to bcm2835-rpi-b-rev2.dts and compile. &spi0

staging: pi433: Plans from Smarthome-Wolf

2017-12-07 Thread Marcus Wolf
Am 06.12.2017 um 14:47 schrieb Dan Carpenter: > On Wed, Dec 06, 2017 at 11:11:27AM +0200, Marcus Wolf wrote: >> >> Since the rule for kernel development seems to be, not to care about future, >> most probably you patch is fine, anyway. >> > > Yeah. Deleting cod

Re: [PATCH 5/6] staging: pi433: Move enum option_on_off to pi433_if.h

2017-12-06 Thread Marcus Wolf
Am 06.12.2017 um 22:42 schrieb Simon Sandström: The enum is now only used for ioctl, so move it pi433_if.h. Signed-off-by: Simon Sandström --- drivers/staging/pi433/pi433_if.h | 5 + drivers/staging/pi433/rf69_enum.h | 5 - 2 files changed, 5 insertions(+), 5 deletions(-) diff -

Re: [PATCH v2 04/11] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-06 Thread Marcus Wolf
Am 06.12.2017 um 21:57 schrieb Simon Sandström: On Wed, Dec 06, 2017 at 01:44:14PM +0300, Dan Carpenter wrote: On Wed, Dec 06, 2017 at 12:31:31PM +0200, Marcus Wolf wrote: Am 06.12.2017 um 12:23 schrieb Dan Carpenter: Wow... This was the one patch I thought was going to sink this

Re: [PATCH v2 04/11] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-06 Thread Marcus Wolf
er is new (mainline for just something like 2 monthes) and stil under devel, I think we should "risk" it. Gruß, Marcus > Am 06.12.2017 um 11:44 schrieb Dan Carpenter : > >> On Wed, Dec 06, 2017 at 12:31:31PM +0200, Marcus Wolf wrote: >> >> >>> Am 06.12

Re: [PATCH v2 06/11] staging: pi433: Split rf69_set_crc_enabled into two functions

2017-12-06 Thread Marcus Wolf
>> >> rf69 -set/get - action >> -> rf69_set_crc_enable > > No... Simon's name is better. His is shorter and makes more sense. I disagree. If I am going to implement a new functionality and need to think about the naming of the function name, every time I need to change a register setting th

Re: [PATCH v2 04/11] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-06 Thread Marcus Wolf
Am 06.12.2017 um 12:23 schrieb Dan Carpenter: On Wed, Dec 06, 2017 at 11:46:41AM +0200, Marcus Wolf wrote: diff --git a/drivers/staging/pi433/rf69_enum.h b/drivers/staging/pi433/rf69_enum.h index babe597e2ec6..5247e9269de9 100644 --- a/drivers/staging/pi433/rf69_enum.h +++ b/drivers/staging

Re: [PATCH v2 06/11] staging: pi433: Split rf69_set_crc_enabled into two functions

2017-12-06 Thread Marcus Wolf
Am 06.12.2017 um 11:37 schrieb Dan Carpenter: On Wed, Dec 06, 2017 at 11:05:22AM +0200, Marcus Wolf wrote: Am 06.12.2017 um 00:08 schrieb Simon Sandström: Splits rf69_set_crc_enabled(dev, enabled) into rf69_enable_crc(dev) and rf69_disable_crc(dev). Signed-off-by: Simon Sandström

Re: [PATCH] staging: pi433: Fixes issue with bit shift in rf69_get_modulation

2017-12-06 Thread Marcus Wolf
Am 06.12.2017 um 11:02 schrieb Greg KH: On Wed, Nov 08, 2017 at 07:13:56PM +0200, Marcus Wolf wrote: Fixes issue with bit shift in rf69_get_modulation What "issue"? Signed-off-by: Marcus Wolf --- drivers/staging/pi433/rf69.c |2 +- 1 file changed, 1 insertion(+),

Re: [PATCH v2 04/11] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-06 Thread Marcus Wolf
Am 06.12.2017 um 00:08 schrieb Simon Sandström: Renames the enum optionOnOff and its values optionOn, optionOff to enum option_on_off and OPTION_ON, OPTION_OFF. Fixes checkpatch.pl warnings: "Avoid CamelCase: , , ". Signed-off-by: Simon Sandström --- drivers/staging/pi433/pi433_if.c | 34 +

Re: [PATCH v2 09/11] staging: pi433: Combine all rf69_set_amplifier_x()

2017-12-06 Thread Marcus Wolf
Am 06.12.2017 um 00:08 schrieb Simon Sandström: Replaces the functions rf69_set_amplifier_1, _2, _3 with two functions: rf69_enable_amplifier(dev, amp_mask) and rf69_disable_amplifier(dev, amp_mask). Signed-off-by: Simon Sandström --- drivers/staging/pi433/pi433_if.c | 6 +++--- drivers/s

Re: [PATCH v2 08/11] staging: pi433: Remove enum data_mode

2017-12-06 Thread Marcus Wolf
Am 06.12.2017 um 00:08 schrieb Simon Sandström: Call rf69_set_data_mode with DATAMODUL_MODE value directly. Signed-off-by: Simon Sandström --- drivers/staging/pi433/pi433_if.c | 2 +- drivers/staging/pi433/rf69.c | 15 ++- drivers/staging/pi433/rf69.h | 2 +- dri

Re: [PATCH v2 06/11] staging: pi433: Split rf69_set_crc_enabled into two functions

2017-12-06 Thread Marcus Wolf
Am 06.12.2017 um 00:08 schrieb Simon Sandström: Splits rf69_set_crc_enabled(dev, enabled) into rf69_enable_crc(dev) and rf69_disable_crc(dev). Signed-off-by: Simon Sandström --- drivers/staging/pi433/pi433_if.c | 22 -- drivers/staging/pi433/rf69.c | 18 ++--

Re: [PATCH 4/6] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-05 Thread Marcus Wolf
Am 05.12.2017 um 13:16 schrieb Dan Carpenter: > On Mon, Dec 04, 2017 at 09:59:02PM +0200, Marcus Wolf wrote: >> Keep in mind, that if you split the functions, in the interface >> implementation you also need more code: >> >> SET_CHECKED(rf69_set_sync_enable(de

Re: [PATCH 4/6] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-05 Thread Marcus Wolf
Am 04.12.2017 um 21:05 schrieb Simon Sandström: > On Mon, Dec 04, 2017 at 09:59:02PM +0200, Marcus Wolf wrote: >> >> Hi Simon, hi Dan, >> >> if you both are of the same opinion, for me, it's fine, if we go with two >> functions. >> >> But

[PATCH V3] staging: pi433: rf69.c: Replace macros READ_REG and WRITE_REG with smarter functions

2017-12-04 Thread Marcus Wolf
x27;t introduced by this patch, but were long and camel cased before. Signed-off-by: Marcus Wolf --- drivers/staging/pi433/rf69.c | 336 ++ 1 file changed, 180 insertions(+), 156 deletions(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/

[PATCH V2] staging: pi433: rf69.c: Replace macros READ_REG and WRITE_REG with inline functions rf69_set_bit, rf69_reset_bit and rf69_read_modify_write

2017-12-04 Thread Marcus Wolf
x27;t introduced by this patch, but were long and camel cased before. Signed-off-by: Marcus Wolf --- drivers/staging/pi433/rf69.c | 336 ++ 1 file changed, 180 insertions(+), 156 deletions(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/

Re: [PATCH 5/6] staging: pi433: Rename enum dataMode in rf69_enum.h

2017-12-04 Thread Marcus Wolf
Am 04.12.2017 um 21:56 schrieb Dan Carpenter: On Mon, Dec 04, 2017 at 09:31:06PM +0200, Marcus Wolf wrote: Then it might be, that DATAMODUL_MODE_PACKET might need an other value. That's future code so we can delete that sentence for now. With the rule above, you are absolutely right

Re: [PATCH 4/6] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-04 Thread Marcus Wolf
Am 04.12.2017 um 21:42 schrieb Simon Sandström: On Mon, Dec 04, 2017 at 09:22:06PM +0200, Marcus Wolf wrote: Am 04.12.2017 um 21:15 schrieb Dan Carpenter: That's a bad name, because it doesn't just enable it also disables. Please split them. regards, dan carpenter Same appl

Re: [PATCH 6/6] staging: pi433: Rename enum modShaping in rf69_enum.h

2017-12-04 Thread Marcus Wolf
Am 04.12.2017 um 21:18 schrieb Dan Carpenter: On Mon, Dec 04, 2017 at 08:59:35PM +0200, Marcus Wolf wrote: Am 04.12.2017 um 12:33 schrieb Dan Carpenter: On Sun, Dec 03, 2017 at 04:17:26PM +0100, Simon Sandström wrote: diff --git a/drivers/staging/pi433/pi433_if.h b/drivers/staging/pi433

Re: [PATCH 5/6] staging: pi433: Rename enum dataMode in rf69_enum.h

2017-12-04 Thread Marcus Wolf
Second there might be the idea of supporting different chips in the future (I already thought about). Linux style is never to write code for the future. Ok. I didn't know. To be honest, I already started writing code, also supporting the rf12 some time ago, thus programming a rfxx.c, but neve

Re: [PATCH 4/6] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-04 Thread Marcus Wolf
Am 04.12.2017 um 21:15 schrieb Dan Carpenter: On Mon, Dec 04, 2017 at 08:37:51PM +0200, Marcus Wolf wrote: Am 04.12.2017 um 12:37 schrieb Dan Carpenter: On Mon, Dec 04, 2017 at 01:17:37PM +0300, Dan Carpenter wrote: Perhaps choose different function names if you want? You could do it as

Re: [PATCH 5/6] staging: pi433: Rename enum dataMode in rf69_enum.h

2017-12-04 Thread Marcus Wolf
Am 04.12.2017 um 12:24 schrieb Dan Carpenter: On Sun, Dec 03, 2017 at 04:17:25PM +0100, Simon Sandström wrote: Renames enum dataMode and its values packet, continuous, continuousNoSync to enum data_mode and PACKET, CONTINUOUS, CONTINUOUS_NO_SYNC. Fixes checkpatch.pl warnings: "Avoid CamelCase:

Re: [PATCH 6/6] staging: pi433: Rename enum modShaping in rf69_enum.h

2017-12-04 Thread Marcus Wolf
Am 04.12.2017 um 12:33 schrieb Dan Carpenter: On Sun, Dec 03, 2017 at 04:17:26PM +0100, Simon Sandström wrote: diff --git a/drivers/staging/pi433/pi433_if.h b/drivers/staging/pi433/pi433_if.h index 34ff0d4807bd..bcfe29840889 100644 --- a/drivers/staging/pi433/pi433_if.h +++ b/drivers/staging/pi

Re: [PATCH 4/6] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-04 Thread Marcus Wolf
Am 04.12.2017 um 12:37 schrieb Dan Carpenter: On Mon, Dec 04, 2017 at 01:17:37PM +0300, Dan Carpenter wrote: Perhaps choose different function names if you want? You could do it as several patches: patch 1: change types to bool patch 2: sed -e '/ == optionOn//' patch 3: split the functions i

[PATCH] staging: pi433: rf69.c: Replace macros READ_REG and WRITE_REG with inline functions rf69_set_bit, rf69_reset_bit and rf69_read_modify_write

2017-12-04 Thread Marcus Wolf
. Signed-off-by: Marcus Wolf --- drivers/staging/pi433/rf69.c | 340 ++ 1 file changed, 182 insertions(+), 158 deletions(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index e69a215..8a31ed7 100644 --- a/drivers/staging/pi433

Re: [PATCH 4/6] staging: pi433: Rename enum optionOnOff in rf69_enum.h

2017-12-03 Thread Marcus Wolf
Am 03.12.2017 um 17:17 schrieb Simon Sandström: Renames the enum optionOnOff and its values optionOn, optionOff to enum option_on_off and OPTION_ON, OPTION_OFF. Fixes checkpatch.pl warnings: "Avoid CamelCase: , , ". Signed-off-by: Simon Sandström --- drivers/staging/pi433/pi433_if.c | 34 +

Re: [PATCH] staging: pi433: Make rf69_set_dc_cut_off_frequency_intern static

2017-12-03 Thread Marcus Wolf
Am 03.12.2017 um 11:56 schrieb Marcin Ciupak: On Sat, Dec 02, 2017 at 08:46:15AM -0800, Joe Perches wrote: On Sat, 2017-12-02 at 17:20 +0200, Marcus Wolf wrote: rf69_set_dc_cut_off_frequency_intern is used by rf69.c internally only. Therefore removed the function from header and declared it

Re: [PATCH] staging: pi433: Make rf69_set_dc_cut_off_frequency_intern static

2017-12-02 Thread Marcus Wolf
Am 02.12.2017 um 18:46 schrieb Joe Perches: On Sat, 2017-12-02 at 17:20 +0200, Marcus Wolf wrote: rf69_set_dc_cut_off_frequency_intern is used by rf69.c internally only. Therefore removed the function from header and declared it staic in the implemtation. Signed-off-by: Marcus Wolf

Re: [PATCH] staging: pi433: rf69.c: Introduced define DEBUG_FUNC_ENTRY

2017-12-02 Thread Marcus Wolf
Am 02.12.2017 um 17:00 schrieb Greg KH: On Sat, Dec 02, 2017 at 01:45:50PM +0200, Marcus Wolf wrote: Since dev_dbg already depends on define DEBUG, there was no sense, to enclose dev_dbg lines with #ifdef DEBUG. Instead of removing #ifdef DEBUG, I introduced define DEBUG_FUNC_ENTRY. So now it

Re: [PATCH] staging: pi433: Removed some obsolete or duplicated defines; moved two defines to better locations

2017-12-02 Thread Marcus Wolf
annoying thing in e-mail? A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Sat, Dec 02, 2017 at 06:00:28PM +0200, Marcus Wolf wrote: Hi Greg, for me the action was "clean up the defines in rf69.c". So for me it was fine, that two defines were

Re: [PATCH] staging: pi433: Make rf69_set_dc_cut_off_frequency_intern static

2017-12-02 Thread Marcus Wolf
Hi! I am sorry :-/ Can you recover, or do I need to resend? Cheers, Marcus Am 02.12.2017 um 17:56 schrieb Greg KH: On Sat, Dec 02, 2017 at 05:20:22PM +0200, Marcus Wolf wrote: rf69_set_dc_cut_off_frequency_intern is used by rf69.c internally only. Therefore removed the function from header

Re: [PATCH] staging: pi433: Removed some obsolete or duplicated defines; moved two defines to better locations

2017-12-02 Thread Marcus Wolf
2, 2017 at 05:14:08PM +0200, Marcus Wolf wrote: The define FIFO_SIZE was moved to rf69_registers.h. Although it is not a register, it is a value, that is given by hardware (like the registers). The define FIFO_THRESHOLD was moved to pi433_if.c, since it is a value, that is freely choosen by the

[PATCH] staging: pi433: Style fix - spaces required

2017-12-02 Thread Marcus Wolf
Leftover changes from patch [PATCH 2/5] staging: pi433: rf69.c style fix - spaces required around from Marcin Ciupak (11.10.2017) Signed-of-by: Marcus Wolf --- drivers/staging/pi433/rf69.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/pi433/rf69.c b

Re: [PATCH 4/5] staging: pi433: rf69.c style fix - code indent should use tabs

2017-12-02 Thread Marcus Wolf
Revieved-by: Marcus Wolf Am 11.10.2017 um 21:24 schrieb Marcin Ciupak: This patch fixes the following checkpatch.pl error: ERROR: code indent should use tabs where possible in rf69.c file as requested by TODO file. Additionally some style warnings remain valid here and could be fixed by

[PATCH] staging: pi433: Make rf69_set_dc_cut_off_frequency_intern static

2017-12-02 Thread Marcus Wolf
rf69_set_dc_cut_off_frequency_intern is used by rf69.c internally only. Therefore removed the function from header and declared it staic in the implemtation. Signed-off-by: Marcus Wolf --- drivers/staging/pi433/rf69.c |2 +- drivers/staging/pi433/rf69.h |1 - 2 files changed, 1 insertion

[PATCH] staging: pi433: Removed some obsolete or duplicated defines; moved two defines to better locations

2017-12-02 Thread Marcus Wolf
response time of the driver, the lower threshold can be set. Signed-off-by: Marcus Wolf --- drivers/staging/pi433/pi433_if.c |1 + drivers/staging/pi433/rf69.c |1 - drivers/staging/pi433/rf69.h |5 - drivers/staging/pi433/rf69_registers.h |5 + 4 files

[PATCH] staging: pi433: rf69.c: Replace macros READ_REG and WRITE_REG with inline functions setBit rstBit and rmwBit

2017-12-02 Thread Marcus Wolf
To increase the readability of the register accesses, the abstraction of the helpers was increased from simple read and write to set bit, reset bit and read modify write bit. In addition - according to the proposal from Walter Harms from 20.07.2017 - instead of marcros inline functions were used.

[PATCH] staging: pi433: rf69.c: Introduced define DEBUG_FUNC_ENTRY

2017-12-02 Thread Marcus Wolf
: Marcus Wolf --- drivers/staging/pi433/rf69.c | 118 +- 1 file changed, 58 insertions(+), 60 deletions(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 12c9df9..0df084e 100644 --- a/drivers/staging/pi433/rf69.c +++ b

[PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()

2017-12-02 Thread Marcus Wolf
Defines used in cases contain already shifted bits, so currentValue must not be shifted. Signed-off-by: Marcus Wolf --- drivers/staging/pi433/rf69.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index e69a215

[PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()

2017-12-02 Thread Marcus Wolf
Defines used in cases contain already shifted bits, so currentValue must not be shifted. signed_of_by: Marcus Wolf --- drivers/staging/pi433/rf69.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index e69a215

Re: [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()

2017-12-02 Thread Marcus Wolf
to prevent the From: line? Should I resend the patch? Thanks, Marcus Am 02.12.2017 um 12:06 schrieb Greg KH: On Sat, Dec 02, 2017 at 11:58:12AM +0200, Marcus Wolf wrote: From: root I think something went wrong here :) Also, you should never need to do kernel development as root...

[PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()

2017-12-02 Thread Marcus Wolf
From: root Defines used in cases contain already shifted bits, so currentValue must not be shifted. Signed-off-by: Marcus Wolf --- drivers/staging/pi433/rf69.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c

Re: staging: pi433: Possible bug in rf69.c

2017-11-30 Thread Marcus Wolf
some basic concepts over there. Cheers, Marcus Am 30.11.2017 um 19:12 schrieb Greg KH: On Thu, Nov 30, 2017 at 06:01:46PM +0100, Marcin Ciupak wrote: On Sat, Nov 11, 2017 at 01:51:10PM +0200, Marcus Wolf wrote: Hi Marcus, since 4.15-rc1 is out I would like to ask if you are going to provide your

Re: staging: pi433: Possible bug in rf69.c

2017-11-11 Thread Marcus Wolf
Walter prefers inline functions to macros. As discussed with Greg, I will provide the patch, as soon as 4.15rc1 is out. Maybe we should move the discussion to then, so you can have a look to that? Cheers, Marcus Am 11.11.2017 um 18:02 schrieb Joe Perches: On Fri, 2017-11-10 at 18:23 +0100, Marcus

Re: staging: pi433: Possible bug in rf69.c

2017-11-11 Thread Marcus Wolf
Hi Greg, ok. I'll postpone all my work until then. Give me a hook, when I can start :-) Thanks, Marcus Am 11.11.2017 um 13:49 schrieb Greg Kroah-Hartman: On Sat, Nov 11, 2017 at 01:42:27PM +0200, Marcus Wolf wrote: Hi Greg, that's fine. Is this the right URL: git://git.kern

Re: staging: pi433: Possible bug in rf69.c

2017-11-11 Thread Marcus Wolf
2017 at 11:42:09AM +0200, Marcus Wolf wrote: Hi Dan, thanks fot the link. I can't remeber, why and what I wanted to redo. Maybe there was a complaint about the format of the patch... In that patch, we also have the topic with the '>> 3', we were discussing a few days ago!

Re: staging: pi433: Possible bug in rf69.c

2017-11-11 Thread Marcus Wolf
Cheers, Marcus Am 11.11.2017 um 10:45 schrieb Dan Carpenter: On Sat, Nov 11, 2017 at 08:55:30AM +0100, Marcus Wolf wrote: Hi Dan, I checked it on my local SVN. You are right. I submitted the code with '&'. Accodring to a check-in message on my SVN, there was a bugreport end

Re: staging: pi433: Possible bug in rf69.c

2017-11-10 Thread Marcus Wolf
x-next? Sorry for not being familiar with that stuff! Thanks a lot, Marcus Am 10.11.2017 um 20:32 schrieb Dan Carpenter: > On Fri, Nov 10, 2017 at 06:23:32PM +0100, Marcus Wolf wrote: >> Hi everybody! >> >> Just comparing the master of Gregs statging of pi433 with my local SVN &

staging: pi433: Possible bug in rf69.c

2017-11-10 Thread Marcus Wolf
Hi everybody! Just comparing the master of Gregs statging of pi433 with my local SVN to review all changes, that were done the last monthes. I am not sure, but maybe we imported a bug in rf69.c lines 378 and following: Gregs repo: case automatic: return WRITE_REG(REG_LNA, ( (READ_REG(RE

Re: [PATCH] staging: pi433: fix missing break in switch statement.

2017-11-10 Thread Marcus Wolf
On 10/11/17 16:49, Marcus Wolf wrote: >> Hi all! >> >> Tryed to cross check... >> >> Don't get it, sorry. >> >> On my private version control (my SVN), where I initially developed the >> driver the break isn't missing. >> Same with my

Re: [PATCH] staging: pi433: fix missing break in switch statement.

2017-11-10 Thread Marcus Wolf
Hi all! Tryed to cross check... Don't get it, sorry. On my private version control (my SVN), where I initially developed the driver the break isn't missing. Same with my git copy of Gregs staging tree. Break is there... Who removed it, why is it missing in Colins copy? Am I working on a wro

[PATCH] Fixes issue with bit shift in rf69_get_modulation

2017-11-08 Thread Marcus Wolf
Fixes issue with bit shift in rf69_get_modulation Signed-off-by: Marcus Wolf --- drivers/staging/pi433/rf69.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 290b419..c945b4b 100644 --- a/drivers/staging

Re: [PATCH] staging: pi433: #define shift constants in rf69.c

2017-11-08 Thread Marcus Wolf
Hello everybody! Concerning the naming: == When writing the rf69.c it wasn't intended to write a driver for Linux. This file was written at a time, where the complete controlling of Pi433 was implemented in the application. Therefore it is written in a completely different

Re: [PATCH v2 1/4] staging: pi433: Style fix - Correct long lines

2017-08-22 Thread Marcus Wolf
Hi everybody, from my point of view, we should stay with the old implementation. Ok - line is too long according to style guide. But these long lines are IMHO easy to read: All four are pretty similar. By having all Tokens in exact the same length and having one below other, you can easily dete

Re: [PATCH] staging: pi433: style fix - space after asterisk

2017-08-08 Thread Marcus Wolf
Reviewed-by: Marcus Wolf Thank you Marcin! > Marcin Ciupak hat am 8. August 2017 um 15:54 > geschrieben: > > > This patch is intended to fix coding style issues in order to comply > with kernel coding style guide as requested by TODO file. > > It fixes the follo

Re: [PATCH] staging: pi433: remove some macros, introduce some inline functions

2017-08-02 Thread Marcus Wolf
bit more intelligent interface, this enhances > > readability and reduces problems with checkpatch.pl at the same time. > > > > In addition obsolete debug ifdefs were removed. > > > > Signed-off-by: Marcus Wolf > > --- > > drivers/staging/pi433/rf69

Re: [PATCH 1/5] staging/pi433:Removed Coding style issues from pi433_if.h and other dependencies arising from it.

2017-08-02 Thread Marcus Wolf
en: > > > On Wed, Aug 02, 2017 at 10:08:04AM +0200, Wolf Entwicklungen wrote: > > Reviewed-by: Marcus Wolf > > > > Just reviewed, not tested. > > As far as I can see, there is no technical issue with this patch. > > You need to be a bit more strict in your rev

Re: [PATCH 1/1] staging: pi433: fix problem with division in rf69_set_deviation

2017-07-30 Thread Marcus Wolf
change in rf69.c I will try to equip an SVN-diff with apropriate headers next week, so Dan can crosscheck with his work - I hope, I will make it without errors... Have a nice weekend, Marcus > Greg KH hat am 30. Juli 2017 um 00:21 > geschrieben: > > > On Sat, Jul 29, 2017 at 10:5

Re: Concerning [PATCH] staging: pi433: fix bugs in register abstraction of rf69 chip

2017-07-29 Thread Marcus Wolf
s about next failing patch :-( Cheers, Marcus > Dan Carpenter hat am 29. Juli 2017 um 12:52 > geschrieben: > > > On Sat, Jul 29, 2017 at 11:16:11AM +0200, Marcus Wolf wrote: > > Hi Greg, > > > > there is another patch from me (see subject). I sent it 19/07/2017.

Concerning [PATCH] staging: pi433: fix bugs in register abstraction of rf69 chip

2017-07-29 Thread Marcus Wolf
Hi Greg, there is another patch from me (see subject). I sent it 19/07/2017. Most probably, there is also something wrong with the patch, but maybe you can get it to work. The patch would be important. It doesn't fix any warnings or errors of static code analysis, but it fixes true implementati

Re: [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static

2017-07-29 Thread Marcus Wolf
Hi Greg, also had a very close look to this patch. Even in your reply I can't find any problems with line wraps or other corruptions :-/ But we have alternative patches, solving these problems as well. You e.g. could use the patch [PATCH] Make functions rf69_set_bandwidth_intern and rf69_set_dc_

Re: [PATCH 1/1] staging: pi433: fix problem with division in rf69_set_deviation

2017-07-29 Thread Marcus Wolf
0, 2017 at 05:56:36PM +0200, Marcus Wolf wrote: > > Fixes problem with division in rf69_set_deviation > > > > Fixes: 874bcba65f9a ("staging: pi433: New driver") > > Signed-off-by: Marcus Wolf > > > > diff --git a/drivers/staging/pi433/rf69.c b/driv

Send a large patch right now or is it better to do it later?

2017-07-28 Thread Marcus Wolf
Hi Greg, according to the proposals of Walter Harms, I revised the rf69.c: I replaced some macros with inline functions and removed some obsolete ifdefs. According to walter this will improve the resource situation. In addition the readybility is enhanced, since lines got shorter. It's a quite bi

Re: [PATCH] staging: pi433: use div_u64 for 64-bit division

2017-07-28 Thread Marcus Wolf
l adresses and several mailboxes from one provider to another within the next two monthes). Sorry for any inconvenience, Marcus > Dan Carpenter hat am 28. Juli 2017 um 16:26 > geschrieben: > > > On Fri, Jul 28, 2017 at 04:21:05PM +0200, Marcus Wolf wrote: > > Hi Arnd, >

Re: [PATCH] staging: pi433: use div_u64 for 64-bit division

2017-07-28 Thread Marcus Wolf
Hi Arnd, we already have a patch for this: [PATCH 1/1] staging: pi433: fix problem with division in rf69_set_deviation from 20.07.2017 Maybe I did something wrong, but my first solution was exactly like your proposal. As far as I remeber, I wasn't able to compile it that way. Therefore I made a

Re: [PATCH] staging: pi433: fix Kconfig entry

2017-07-26 Thread Marcus Wolf
Reviewed-by: Marcus Wolf This is similar to patch "[PATCH -next] staging: pi433: depends on SPI" of Randy Dunlap > Arnd Bergmann hat am 25. Juli 2017 um 17:38 geschrieben: > > > I ran into a build error with the new pi433 driver and > CONFIG_SPI disabled: > > d

Re: [PATCH 1/3] staging: pi433: Style fix - align block comments

2017-07-24 Thread Marcus Wolf
Hi Dan, when I started with the RFM69CW about two years ago (at the beginning not as a driver, but everything within the applicaton) I kind of automatically produced a list of all registers of the chip (most probably by importing and reorganizing the datasheet in Excel). Everytime I need to touch

Re: [PATCH] staging: pi433: fix sparse warning: missing static

2017-07-23 Thread Marcus Wolf
reviewed-by: Marcus Wolf The fixes of this patch are fine, but there are already patches out there, containing these fixes. Thanks, Marcus > David Wittman hat am 24. Juli 2017 um 00:46 geschrieben: > > > A few local functions in the pi433 module were getting flagged by Sparse &

Re: [PATCH 1/3] staging: pi433: Style fix - align block comments

2017-07-22 Thread Marcus Wolf
Reviewed-by: Marcus Wolf Thanks for your work, Derek! > Derek Robson hat am 22. Juli 2017 um 05:50 geschrieben: > > > Fixed the alignment of block comments > Found using checkpatch > > Signed-off-by: Derek Robson > --- > drivers/staging/pi433/pi433_if.c

Re: [PATCH 2/3] staging: pi433: - style fix, space before tabs

2017-07-22 Thread Marcus Wolf
Reviewed-by: Marcus Wolf >From my point of view, the rearrangement of the block of SET_CHECKED reduces >the readability a lot. I like same stuff to be aligned (all brakets below each other as a column, all spi->dev below each other and so on) But if it is necessary to fullfill the

Re: [PATCH 3/3] staging: pi433: - style fix, space at start of line

2017-07-22 Thread Marcus Wolf
Reviewed-by: Marcus Wolf Regarding the patch for rf69.c, I'd prefer to have all mantisses allinged (all 'm' as a column below each other, all 'a' below each other, ...). For me that improves the readability a lot. Maybe that can be acchieved somehow without breaking

Re: [PATCH] Make functions rf69_set_bandwidth_intern and rf69_set_dc_cut_off_frequency_intern static

2017-07-21 Thread Marcus Wolf
Reviewed-by: Marcus Wolf Attention: This patch is nothing new, just a combination of Patch [PATCH 2/3][staging-next] staging: pi433: Make functions rf69_set_bandwidth_intern static and [PATCH 1/1][staging-next] staging: pi433: Make functions rf69_set_dc_cut_off_frequency_intern static > Co

Re: [PATCH] staging: pi433: fix bugs in register abstraction of rf69 chip

2017-07-20 Thread Marcus Wolf
gt; Bugfixes for rf69_set_modulation, rf69_set_deviation, rf69_set_lna_gain and > > rf69_get_lna_gain > > The fixes are cross-checked with the datasheet of the rfm69cw > > > > Fixes: 874bcba65f9a ("staging: pi433: New driver") > > Signed-off-by: Marcus Wolf >

Test of [PATCH 1/1] staging: pi433: fix problem with division in rf69_set_deviation

2017-07-20 Thread Marcus Wolf
gt; > > Hi Dan, > > On Thu, Jul 20, 2017 at 1:37 PM, Dan Carpenter > wrote: > > On Thu, Jul 20, 2017 at 01:23:05PM +0200, Marcus Wolf wrote: > >> below you can see the report with the error on m68k. It was sent to me from > >> a > >> test robot of i

[PATCH 1/1] staging: pi433: fix problem with division in rf69_set_deviation

2017-07-20 Thread Marcus Wolf
Fixes problem with division in rf69_set_deviation Fixes: 874bcba65f9a ("staging: pi433: New driver") Signed-off-by: Marcus Wolf diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -221,7 +22

  1   2   >