better separation

This commit is contained in:
2025-06-13 12:26:54 +01:00
parent e8f5493e5d
commit 46acdf410e
5 changed files with 62 additions and 54 deletions

View File

@ -10,6 +10,7 @@
#include <linux/of_irq.h>
#include <linux/workqueue.h>
#include "ls7366r_registers.h"
#include "ls7366r.h"
@ -31,7 +32,7 @@ static int writeCmdData(struct spi_device *client, u8 c, u8 d) {
return spi_write(client, buf, 2);
}
int read32(struct spi_device *client, u8 c, u32 *r) {
static int read32(struct spi_device *client, u8 c, u32 *r) {
u8 tx_buf[5];
tx_buf[0] = c;
u8 rx_buf[5];
@ -49,6 +50,10 @@ int read32(struct spi_device *client, u8 c, u32 *r) {
return 0;
}
int read_otr(struct spi_device *client, u32 *r) {
return read32(client, CMD_RD | REG_OTR, r);
}
static int read8(struct spi_device *client, u8 c, u8 *r) {
u8 tx_buf[2];
tx_buf[0] = c;