RE: [PATCH v26 2/4] dt-bindings: i2c: ast2600-i2c.yaml: Add global-regs and transfer-mode properties
Ryan Chen <[email protected]>
| Newsgroups | org.ozlabs.lists.openbmc,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-i2c,org.kernel.vger.linux-kernel,org.ozlabs.lists.linux-aspeed |
|---|---|
| Message-ID | <TY2PPF5CB9A1BE6057839BCA0003DE7FC4EF24EA@TY2PPF5CB9A1BE6.apcprd06.prod.outlook.com> |
> Subject: Re: [PATCH v26 2/4] dt-bindings: i2c: ast2600-i2c.yaml: Add global-regs > and transfer-mode properties > > Hi Ryan, > > > > 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)