a1b17e4f | 10-Dec-2018 |
Simon Glass <sjg@chromium.org> |
dm: core: Add a function to read into a unsigned int
The current dev_read...() functions use s32 and u32 which are convenient for device tree but not so useful for normal code, which often wants to
dm: core: Add a function to read into a unsigned int
The current dev_read...() functions use s32 and u32 which are convenient for device tree but not so useful for normal code, which often wants to use normal integers for values.
Add a helper which supports returning an unsigned int. Also add signed versions of the unsigned readers.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
e96fa6c9 | 10-Dec-2018 |
Simon Glass <sjg@chromium.org> |
dm: sound: Create a uclass for i2s
The i2s bus is commonly used with audio codecs. It provides a way to stream digital data sychronously in both directions. U-Boot only supports audio output, so thi
dm: sound: Create a uclass for i2s
The i2s bus is commonly used with audio codecs. It provides a way to stream digital data sychronously in both directions. U-Boot only supports audio output, so this uclass is very simple, with a single tx_data() method.
Add a uclass and a test for i2s.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
79598820 | 03-Dec-2018 |
Álvaro Fernández Rojas <noltari@gmail.com> |
dm: core: add functions to get/remap I/O addresses by name
This functions allow us to get and remap I/O addresses by name, which is useful when there are multiple reg addresses indexed by reg-names
dm: core: add functions to get/remap I/O addresses by name
This functions allow us to get and remap I/O addresses by name, which is useful when there are multiple reg addresses indexed by reg-names property. This is needed in bmips dma/eth patch series, but can also be used on many other drivers.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
b7c25b11 | 18-Nov-2018 |
Simon Glass <sjg@chromium.org> |
dm: sandbox: i2c: Add a new 'emulation parent' uclass
Sandbox i2c works using emulation drivers which are currently children of the i2c device:
rtc_0: rtc@43 { reg = <0x43>; compatible = "sand
dm: sandbox: i2c: Add a new 'emulation parent' uclass
Sandbox i2c works using emulation drivers which are currently children of the i2c device:
rtc_0: rtc@43 { reg = <0x43>; compatible = "sandbox-rtc"; emul { compatible = "sandbox,i2c-rtc"; }; };
In this case the emulation device is attached to i2c bus on address 0x43 and provides the Real-Time-Clock (RTC) functionality.
However this is not ideal, since every device on an I2C bus has a child device. This is only really the case for sandbox, but we want to avoid special-case code for sandbox.
A better approach seems to be to add a separate node on the bus, an 'emulation parent'. This can be given a bogus address (such as 0xff) and hides all the emulators away. Then we can use a phandle to point from the device to the correct emualtor, and only on sandbox. The code to find an emulator does not interfere with normal i2c operation.
Add a new UCLASS_I2C_EMUL_PARENT uclass which allows finding an emulator given a bus, and finding a bus given an emulator. This will be used in a follow-on patch.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
25cbb470 | 18-Nov-2018 |
Simon Glass <sjg@chromium.org> |
dm: core: Put UCLASS_SIMPLE_BUS in order
This is currently at the top in the space for internal use. But this uclass is used outside driver model and test code. Move it into the correct alpha order.
dm: core: Put UCLASS_SIMPLE_BUS in order
This is currently at the top in the space for internal use. But this uclass is used outside driver model and test code. Move it into the correct alpha order.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
3abe1115 | 18-Nov-2018 |
Simon Glass <sjg@chromium.org> |
dm: core: Add a few more specific child-finding functions
Add two functions which can find a child device by uclass or by name. The first is useful with Multi-Function-Devices (MFDs) to find one of
dm: core: Add a few more specific child-finding functions
Add two functions which can find a child device by uclass or by name. The first is useful with Multi-Function-Devices (MFDs) to find one of a particular type. The second is useful when only the name is known.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|