upstream u-boot with additional patches for our devices/boards: https://lists.denx.de/pipermail/u-boot/2017-March/282789.html (AXP crashes) ; Gbit ethernet patch for some LIME2 revisions ; with SPI flash support
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
u-boot/drivers/spmi/spmi-uclass.c

39 lines
807 B

// SPDX-License-Identifier: GPL-2.0+
/*
* SPMI bus uclass driver
*
* (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
*/
#include <common.h>
#include <dm.h>
#include <errno.h>
#include <spmi/spmi.h>
#include <linux/ctype.h>
int spmi_reg_read(struct udevice *dev, int usid, int pid, int reg)
{
const struct dm_spmi_ops *ops = dev_get_driver_ops(dev);
if (!ops || !ops->read)
return -ENOSYS;
return ops->read(dev, usid, pid, reg);
}
int spmi_reg_write(struct udevice *dev, int usid, int pid, int reg,
uint8_t value)
{
const struct dm_spmi_ops *ops = dev_get_driver_ops(dev);
if (!ops || !ops->write)
return -ENOSYS;
return ops->write(dev, usid, pid, reg, value);
}
UCLASS_DRIVER(spmi) = {
.id = UCLASS_SPMI,
.name = "spmi",
.post_bind = dm_scan_fdt_dev,
};