Skip to content

Commit 2c42dd6

Browse files
Merge remote-tracking branch 'origin/ib-chrome-platform-mfd-move-cros_ec_lpc' into working-branch-for-4.20
2 parents d4d2313 + e2bbf91 commit 2c42dd6

File tree

8 files changed

+322
-221
lines changed

8 files changed

+322
-221
lines changed

drivers/mfd/cros_ec_dev.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@
2626

2727
#define CROS_EC_DEV_VERSION "1.0.0"
2828

29-
/*
30-
* @offset: within EC_LPC_ADDR_MEMMAP region
31-
* @bytes: number of bytes to read. zero means "read a string" (including '\0')
32-
* (at most only EC_MEMMAP_SIZE bytes can be read)
33-
* @buffer: where to store the result
34-
* ioctl returns the number of bytes read, negative on error
29+
/**
30+
* struct cros_ec_readmem - Struct used to read mapped memory.
31+
* @offset: Within EC_LPC_ADDR_MEMMAP region.
32+
* @bytes: Number of bytes to read. Zero means "read a string" (including '\0')
33+
* At most only EC_MEMMAP_SIZE bytes can be read.
34+
* @buffer: Where to store the result. The ioctl returns the number of bytes
35+
* read or negative on error.
3536
*/
3637
struct cros_ec_readmem {
3738
uint32_t offset;

drivers/platform/chrome/cros_ec_lpc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@
2727
#include <linux/io.h>
2828
#include <linux/mfd/cros_ec.h>
2929
#include <linux/mfd/cros_ec_commands.h>
30-
#include <linux/mfd/cros_ec_lpc_reg.h>
3130
#include <linux/module.h>
3231
#include <linux/platform_device.h>
3332
#include <linux/printk.h>
3433
#include <linux/suspend.h>
3534

35+
#include "cros_ec_lpc_reg.h"
36+
3637
#define DRV_NAME "cros_ec_lpcs"
3738
#define ACPI_DRV_NAME "GOOG0004"
3839

drivers/platform/chrome/cros_ec_lpc_mec.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@
2424
#include <linux/delay.h>
2525
#include <linux/io.h>
2626
#include <linux/mfd/cros_ec_commands.h>
27-
#include <linux/mfd/cros_ec_lpc_mec.h>
2827
#include <linux/mutex.h>
2928
#include <linux/types.h>
3029

30+
#include "cros_ec_lpc_mec.h"
31+
3132
/*
3233
* This mutex must be held while accessing the EMI unit. We can't rely on the
3334
* EC mutex because memmap data may be accessed without it being held.

include/linux/mfd/cros_ec_lpc_mec.h renamed to drivers/platform/chrome/cros_ec_lpc_mec.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
* expensive.
2222
*/
2323

24-
#ifndef __LINUX_MFD_CROS_EC_MEC_H
25-
#define __LINUX_MFD_CROS_EC_MEC_H
24+
#ifndef __CROS_EC_LPC_MEC_H
25+
#define __CROS_EC_LPC_MEC_H
2626

2727
#include <linux/mfd/cros_ec_commands.h>
2828

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

90-
#endif /* __LINUX_MFD_CROS_EC_MEC_H */
90+
#endif /* __CROS_EC_LPC_MEC_H */

drivers/platform/chrome/cros_ec_lpc_reg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
#include <linux/io.h>
2525
#include <linux/mfd/cros_ec.h>
2626
#include <linux/mfd/cros_ec_commands.h>
27-
#include <linux/mfd/cros_ec_lpc_mec.h>
27+
28+
#include "cros_ec_lpc_mec.h"
2829

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

include/linux/mfd/cros_ec_lpc_reg.h renamed to drivers/platform/chrome/cros_ec_lpc_reg.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
* expensive.
2222
*/
2323

24-
#ifndef __LINUX_MFD_CROS_EC_REG_H
25-
#define __LINUX_MFD_CROS_EC_REG_H
24+
#ifndef __CROS_EC_LPC_REG_H
25+
#define __CROS_EC_LPC_REG_H
2626

2727
/**
2828
* cros_ec_lpc_read_bytes - Read bytes from a given LPC-mapped address.
@@ -58,4 +58,4 @@ void cros_ec_lpc_reg_init(void);
5858
*/
5959
void cros_ec_lpc_reg_destroy(void);
6060

61-
#endif /* __LINUX_MFD_CROS_EC_REG_H */
61+
#endif /* __CROS_EC_LPC_REG_H */

0 commit comments

Comments
 (0)