Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 2c42dd6e authored by Benson Leung's avatar Benson Leung
Browse files

Merge remote-tracking branch 'origin/ib-chrome-platform-mfd-move-cros_ec_lpc'...

Merge remote-tracking branch 'origin/ib-chrome-platform-mfd-move-cros_ec_lpc' into working-branch-for-4.20
parents d4d2313a e2bbf91c
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -26,12 +26,13 @@

#define CROS_EC_DEV_VERSION "1.0.0"

/*
 * @offset: within EC_LPC_ADDR_MEMMAP region
 * @bytes: number of bytes to read. zero means "read a string" (including '\0')
 *         (at most only EC_MEMMAP_SIZE bytes can be read)
 * @buffer: where to store the result
 * ioctl returns the number of bytes read, negative on error
/**
 * struct cros_ec_readmem - Struct used to read mapped memory.
 * @offset: Within EC_LPC_ADDR_MEMMAP region.
 * @bytes: Number of bytes to read. Zero means "read a string" (including '\0')
 *         At most only EC_MEMMAP_SIZE bytes can be read.
 * @buffer: Where to store the result. The ioctl returns the number of bytes
 *         read or negative on error.
 */
struct cros_ec_readmem {
	uint32_t offset;
+2 −1
Original line number Diff line number Diff line
@@ -27,12 +27,13 @@
#include <linux/io.h>
#include <linux/mfd/cros_ec.h>
#include <linux/mfd/cros_ec_commands.h>
#include <linux/mfd/cros_ec_lpc_reg.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/printk.h>
#include <linux/suspend.h>

#include "cros_ec_lpc_reg.h"

#define DRV_NAME "cros_ec_lpcs"
#define ACPI_DRV_NAME "GOOG0004"

+2 −1
Original line number Diff line number Diff line
@@ -24,10 +24,11 @@
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/mfd/cros_ec_commands.h>
#include <linux/mfd/cros_ec_lpc_mec.h>
#include <linux/mutex.h>
#include <linux/types.h>

#include "cros_ec_lpc_mec.h"

/*
 * This mutex must be held while accessing the EMI unit. We can't rely on the
 * EC mutex because memmap data may be accessed without it being held.
+3 −3
Original line number Diff line number Diff line
@@ -21,8 +21,8 @@
 * expensive.
 */

#ifndef __LINUX_MFD_CROS_EC_MEC_H
#define __LINUX_MFD_CROS_EC_MEC_H
#ifndef __CROS_EC_LPC_MEC_H
#define __CROS_EC_LPC_MEC_H

#include <linux/mfd/cros_ec_commands.h>

@@ -87,4 +87,4 @@ void cros_ec_lpc_mec_destroy(void);
u8 cros_ec_lpc_io_bytes_mec(enum cros_ec_lpc_mec_io_type io_type,
			    unsigned int offset, unsigned int length, u8 *buf);

#endif /* __LINUX_MFD_CROS_EC_MEC_H */
#endif /* __CROS_EC_LPC_MEC_H */
+2 −1
Original line number Diff line number Diff line
@@ -24,7 +24,8 @@
#include <linux/io.h>
#include <linux/mfd/cros_ec.h>
#include <linux/mfd/cros_ec_commands.h>
#include <linux/mfd/cros_ec_lpc_mec.h>

#include "cros_ec_lpc_mec.h"

static u8 lpc_read_bytes(unsigned int offset, unsigned int length, u8 *dest)
{
Loading