Subject: Re: [PATCH v26 2/4] dt-bindings: i2c: ast2600-i2c.yaml: Add global-regs
and transfer-mode properties
Hi Ryan,
quoted
quoted
Do you mean sysfs select support mode selection(byte, buffer, dma)
Or just force byte mode?
I would think that the best approach would be a mechanism to specify
the mode - either byte, buffer, or DMA - if DMA is indicated as
available to the controller.
... with a sensible default mode (DMA if it is available, buffer if not).
But none of that logic relates to the binding, it's all driver implementation
detail.
I will add new dma_available in struct ast2600_i2c_bus, align with dma property.
i2c_bus->dma_available = device_property_read_bool(dev, "aspeed,enable-dma");
And add sysfs for xfer_mode
static ssize_t xfer_mode_show(struct device *dev, struct device_attribute *attr, char *buf)
static ssize_t xfer_mode_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)