]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
at86rf230: change trac status check behaviour
authorAlexander Aring <alex.aring@gmail.com>
Thu, 27 Aug 2015 19:49:17 +0000 (21:49 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 17 Sep 2015 11:20:04 +0000 (13:20 +0200)
commit346ce4bbddfd40aa62b899db8982c728ed3d42a5
tree7d640917bd3b881b5856443a7394606499446e9e
parenta1d8d9a57c3389dc95698ad44284c13330235691
at86rf230: change trac status check behaviour

When transmit is done, indicated by trx_end irq, we do first a force
state change to TX_ON and then checking the trac status, if the trac
status is unequal zero we do a state change to TRX_OFF.

This patch changes to the following behaviour, we first check on trac
status after trx_end occurs and then doing a normal change to TX_ON
without do the state change to TRX_OFF when trac status is unequal zero.

The reasons are that the datasheet doesn't described when the trac
status register is cleared, we should doing to evaluate the trac status
at first. The reason to remove the TRX_OFF change if the trac status is
unequal to zero and it was force is the following paragraph inside The
at86rf2xx datasheets:

"Using FORCE_PLL_ON to interrupt an TX_ARET transaction, it is
 recommended to check register bits [7:5] of register address 0x32 for
 value 0. If this value is different, TRX_CMD sequence FORCE_TRX_OFF shall
 be used immediately followed by TRX_CMD sequence PLL_ON. This performs a
 state transition to PLL_ON."

The meaning is here "to interrupt an TX_ARET transaction" in case of
trx_end interrupt the "TX_ARET transaction" is already done and we don't
interrupt the "TX_ARET transaction" by doing the change to TX_ON (PLL_ON)
here. Additional I changed the force change to normal TX_ON which seems to
work here.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/net/ieee802154/at86rf230.c