Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
4398ef0e
Commit
4398ef0e
authored
Dec 15, 2017
by
Benson Leung
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ibs-for-chrome-platform-merged' into working-branch-for-4.16
Signed-off-by:
Benson Leung
<
bleung@chromium.org
>
parents
50c4c4e2
5e011558
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
37 additions
and
51 deletions
+37
-51
drivers/mfd/Kconfig
drivers/mfd/Kconfig
+10
-0
drivers/mfd/Makefile
drivers/mfd/Makefile
+1
-0
drivers/mfd/cros_ec.c
drivers/mfd/cros_ec.c
+2
-2
drivers/mfd/cros_ec_dev.c
drivers/mfd/cros_ec_dev.c
+5
-3
drivers/mfd/cros_ec_dev.h
drivers/mfd/cros_ec_dev.h
+0
-0
drivers/platform/chrome/Kconfig
drivers/platform/chrome/Kconfig
+2
-8
drivers/platform/chrome/Makefile
drivers/platform/chrome/Makefile
+3
-4
drivers/platform/chrome/cros_ec_debugfs.c
drivers/platform/chrome/cros_ec_debugfs.c
+2
-3
drivers/platform/chrome/cros_ec_debugfs.h
drivers/platform/chrome/cros_ec_debugfs.h
+0
-27
drivers/platform/chrome/cros_ec_lightbar.c
drivers/platform/chrome/cros_ec_lightbar.c
+4
-2
drivers/platform/chrome/cros_ec_sysfs.c
drivers/platform/chrome/cros_ec_sysfs.c
+3
-2
drivers/platform/chrome/cros_ec_vbc.c
drivers/platform/chrome/cros_ec_vbc.c
+1
-0
include/linux/mfd/cros_ec.h
include/linux/mfd/cros_ec.h
+4
-0
No files found.
drivers/mfd/Kconfig
View file @
4398ef0e
...
@@ -222,6 +222,16 @@ config MFD_CROS_EC_SPI
...
@@ -222,6 +222,16 @@ config MFD_CROS_EC_SPI
response time cannot be guaranteed, we support ignoring
response time cannot be guaranteed, we support ignoring
'pre-amble' bytes before the response actually starts.
'pre-amble' bytes before the response actually starts.
config MFD_CROS_EC_CHARDEV
tristate "Chrome OS Embedded Controller userspace device interface"
depends on MFD_CROS_EC
select CROS_EC_CTL
---help---
This driver adds support to talk with the ChromeOS EC from userspace.
If you have a supported Chromebook, choose Y or M here.
The module will be called cros_ec_dev.
config MFD_ASIC3
config MFD_ASIC3
bool "Compaq ASIC3"
bool "Compaq ASIC3"
depends on GPIOLIB && ARM
depends on GPIOLIB && ARM
...
...
drivers/mfd/Makefile
View file @
4398ef0e
...
@@ -17,6 +17,7 @@ cros_ec_core-$(CONFIG_ACPI) += cros_ec_acpi_gpe.o
...
@@ -17,6 +17,7 @@ cros_ec_core-$(CONFIG_ACPI) += cros_ec_acpi_gpe.o
obj-$(CONFIG_MFD_CROS_EC)
+=
cros_ec_core.o
obj-$(CONFIG_MFD_CROS_EC)
+=
cros_ec_core.o
obj-$(CONFIG_MFD_CROS_EC_I2C)
+=
cros_ec_i2c.o
obj-$(CONFIG_MFD_CROS_EC_I2C)
+=
cros_ec_i2c.o
obj-$(CONFIG_MFD_CROS_EC_SPI)
+=
cros_ec_spi.o
obj-$(CONFIG_MFD_CROS_EC_SPI)
+=
cros_ec_spi.o
obj-$(CONFIG_MFD_CROS_EC_CHARDEV)
+=
cros_ec_dev.o
obj-$(CONFIG_MFD_EXYNOS_LPASS)
+=
exynos-lpass.o
obj-$(CONFIG_MFD_EXYNOS_LPASS)
+=
exynos-lpass.o
rtsx_pci-objs
:=
rtsx_pcr.o rts5209.o rts5229.o rtl8411.o rts5227.o rts5249.o
rtsx_pci-objs
:=
rtsx_pcr.o rts5209.o rts5229.o rtl8411.o rts5227.o rts5249.o
...
...
drivers/mfd/cros_ec.c
View file @
4398ef0e
...
@@ -40,13 +40,13 @@ static struct cros_ec_platform pd_p = {
...
@@ -40,13 +40,13 @@ static struct cros_ec_platform pd_p = {
};
};
static
const
struct
mfd_cell
ec_cell
=
{
static
const
struct
mfd_cell
ec_cell
=
{
.
name
=
"cros-ec-
ctl
"
,
.
name
=
"cros-ec-
dev
"
,
.
platform_data
=
&
ec_p
,
.
platform_data
=
&
ec_p
,
.
pdata_size
=
sizeof
(
ec_p
),
.
pdata_size
=
sizeof
(
ec_p
),
};
};
static
const
struct
mfd_cell
ec_pd_cell
=
{
static
const
struct
mfd_cell
ec_pd_cell
=
{
.
name
=
"cros-ec-
ctl
"
,
.
name
=
"cros-ec-
dev
"
,
.
platform_data
=
&
pd_p
,
.
platform_data
=
&
pd_p
,
.
pdata_size
=
sizeof
(
pd_p
),
.
pdata_size
=
sizeof
(
pd_p
),
};
};
...
...
drivers/
platform/chrome
/cros_ec_dev.c
→
drivers/
mfd
/cros_ec_dev.c
View file @
4398ef0e
...
@@ -25,9 +25,10 @@
...
@@ -25,9 +25,10 @@
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/uaccess.h>
#include "cros_ec_debugfs.h"
#include "cros_ec_dev.h"
#include "cros_ec_dev.h"
#define DRV_NAME "cros-ec-dev"
/* Device variables */
/* Device variables */
#define CROS_MAX_DEV 128
#define CROS_MAX_DEV 128
static
int
ec_major
;
static
int
ec_major
;
...
@@ -461,7 +462,7 @@ static int ec_device_remove(struct platform_device *pdev)
...
@@ -461,7 +462,7 @@ static int ec_device_remove(struct platform_device *pdev)
}
}
static
const
struct
platform_device_id
cros_ec_id
[]
=
{
static
const
struct
platform_device_id
cros_ec_id
[]
=
{
{
"cros-ec-ctl"
,
0
},
{
DRV_NAME
,
0
},
{
/* sentinel */
},
{
/* sentinel */
},
};
};
MODULE_DEVICE_TABLE
(
platform
,
cros_ec_id
);
MODULE_DEVICE_TABLE
(
platform
,
cros_ec_id
);
...
@@ -493,7 +494,7 @@ static const struct dev_pm_ops cros_ec_dev_pm_ops = {
...
@@ -493,7 +494,7 @@ static const struct dev_pm_ops cros_ec_dev_pm_ops = {
static
struct
platform_driver
cros_ec_dev_driver
=
{
static
struct
platform_driver
cros_ec_dev_driver
=
{
.
driver
=
{
.
driver
=
{
.
name
=
"cros-ec-ctl"
,
.
name
=
DRV_NAME
,
.
pm
=
&
cros_ec_dev_pm_ops
,
.
pm
=
&
cros_ec_dev_pm_ops
,
},
},
.
probe
=
ec_device_probe
,
.
probe
=
ec_device_probe
,
...
@@ -544,6 +545,7 @@ static void __exit cros_ec_dev_exit(void)
...
@@ -544,6 +545,7 @@ static void __exit cros_ec_dev_exit(void)
module_init
(
cros_ec_dev_init
);
module_init
(
cros_ec_dev_init
);
module_exit
(
cros_ec_dev_exit
);
module_exit
(
cros_ec_dev_exit
);
MODULE_ALIAS
(
"platform:"
DRV_NAME
);
MODULE_AUTHOR
(
"Bill Richardson <wfrichar@chromium.org>"
);
MODULE_AUTHOR
(
"Bill Richardson <wfrichar@chromium.org>"
);
MODULE_DESCRIPTION
(
"Userspace interface to the Chrome OS Embedded Controller"
);
MODULE_DESCRIPTION
(
"Userspace interface to the Chrome OS Embedded Controller"
);
MODULE_VERSION
(
"1.0"
);
MODULE_VERSION
(
"1.0"
);
...
...
drivers/
platform/chrome
/cros_ec_dev.h
→
drivers/
mfd
/cros_ec_dev.h
View file @
4398ef0e
File moved
drivers/platform/chrome/Kconfig
View file @
4398ef0e
...
@@ -38,14 +38,8 @@ config CHROMEOS_PSTORE
...
@@ -38,14 +38,8 @@ config CHROMEOS_PSTORE
If you have a supported Chromebook, choose Y or M here.
If you have a supported Chromebook, choose Y or M here.
The module will be called chromeos_pstore.
The module will be called chromeos_pstore.
config CROS_EC_CHARDEV
config CROS_EC_CTL
tristate "Chrome OS Embedded Controller userspace device interface"
tristate
depends on MFD_CROS_EC
---help---
This driver adds support to talk with the ChromeOS EC from userspace.
If you have a supported Chromebook, choose Y or M here.
The module will be called cros_ec_dev.
config CROS_EC_LPC
config CROS_EC_LPC
tristate "ChromeOS Embedded Controller (LPC)"
tristate "ChromeOS Embedded Controller (LPC)"
...
...
drivers/platform/chrome/Makefile
View file @
4398ef0e
...
@@ -2,10 +2,9 @@
...
@@ -2,10 +2,9 @@
obj-$(CONFIG_CHROMEOS_LAPTOP)
+=
chromeos_laptop.o
obj-$(CONFIG_CHROMEOS_LAPTOP)
+=
chromeos_laptop.o
obj-$(CONFIG_CHROMEOS_PSTORE)
+=
chromeos_pstore.o
obj-$(CONFIG_CHROMEOS_PSTORE)
+=
chromeos_pstore.o
cros_ec_devs-objs
:=
cros_ec_dev.o cros_ec_sysfs.o
\
cros_ec_ctl-objs
:=
cros_ec_sysfs.o cros_ec_lightbar.o
\
cros_ec_lightbar.o cros_ec_vbc.o
\
cros_ec_vbc.o cros_ec_debugfs.o
cros_ec_debugfs.o
obj-$(CONFIG_CROS_EC_CTL)
+=
cros_ec_ctl.o
obj-$(CONFIG_CROS_EC_CHARDEV)
+=
cros_ec_devs.o
cros_ec_lpcs-objs
:=
cros_ec_lpc.o cros_ec_lpc_reg.o
cros_ec_lpcs-objs
:=
cros_ec_lpc.o cros_ec_lpc_reg.o
cros_ec_lpcs-$(CONFIG_CROS_EC_LPC_MEC)
+=
cros_ec_lpc_mec.o
cros_ec_lpcs-$(CONFIG_CROS_EC_LPC_MEC)
+=
cros_ec_lpc_mec.o
obj-$(CONFIG_CROS_EC_LPC)
+=
cros_ec_lpcs.o
obj-$(CONFIG_CROS_EC_LPC)
+=
cros_ec_lpcs.o
...
...
drivers/platform/chrome/cros_ec_debugfs.c
View file @
4398ef0e
...
@@ -29,9 +29,6 @@
...
@@ -29,9 +29,6 @@
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/wait.h>
#include <linux/wait.h>
#include "cros_ec_dev.h"
#include "cros_ec_debugfs.h"
#define LOG_SHIFT 14
#define LOG_SHIFT 14
#define LOG_SIZE (1 << LOG_SHIFT)
#define LOG_SIZE (1 << LOG_SHIFT)
#define LOG_POLL_SEC 10
#define LOG_POLL_SEC 10
...
@@ -390,6 +387,7 @@ int cros_ec_debugfs_init(struct cros_ec_dev *ec)
...
@@ -390,6 +387,7 @@ int cros_ec_debugfs_init(struct cros_ec_dev *ec)
debugfs_remove_recursive
(
debug_info
->
dir
);
debugfs_remove_recursive
(
debug_info
->
dir
);
return
ret
;
return
ret
;
}
}
EXPORT_SYMBOL
(
cros_ec_debugfs_init
);
void
cros_ec_debugfs_remove
(
struct
cros_ec_dev
*
ec
)
void
cros_ec_debugfs_remove
(
struct
cros_ec_dev
*
ec
)
{
{
...
@@ -399,3 +397,4 @@ void cros_ec_debugfs_remove(struct cros_ec_dev *ec)
...
@@ -399,3 +397,4 @@ void cros_ec_debugfs_remove(struct cros_ec_dev *ec)
debugfs_remove_recursive
(
ec
->
debug_info
->
dir
);
debugfs_remove_recursive
(
ec
->
debug_info
->
dir
);
cros_ec_cleanup_console_log
(
ec
->
debug_info
);
cros_ec_cleanup_console_log
(
ec
->
debug_info
);
}
}
EXPORT_SYMBOL
(
cros_ec_debugfs_remove
);
drivers/platform/chrome/cros_ec_debugfs.h
deleted
100644 → 0
View file @
50c4c4e2
/*
* Copyright 2015 Google, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _DRV_CROS_EC_DEBUGFS_H_
#define _DRV_CROS_EC_DEBUGFS_H_
#include "cros_ec_dev.h"
/* debugfs stuff */
int
cros_ec_debugfs_init
(
struct
cros_ec_dev
*
ec
);
void
cros_ec_debugfs_remove
(
struct
cros_ec_dev
*
ec
);
#endif
/* _DRV_CROS_EC_DEBUGFS_H_ */
drivers/platform/chrome/cros_ec_lightbar.c
View file @
4398ef0e
...
@@ -33,8 +33,6 @@
...
@@ -33,8 +33,6 @@
#include <linux/uaccess.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include "cros_ec_dev.h"
/* Rate-limit the lightbar interface to prevent DoS. */
/* Rate-limit the lightbar interface to prevent DoS. */
static
unsigned
long
lb_interval_jiffies
=
50
*
HZ
/
1000
;
static
unsigned
long
lb_interval_jiffies
=
50
*
HZ
/
1000
;
...
@@ -414,6 +412,7 @@ int lb_manual_suspend_ctrl(struct cros_ec_dev *ec, uint8_t enable)
...
@@ -414,6 +412,7 @@ int lb_manual_suspend_ctrl(struct cros_ec_dev *ec, uint8_t enable)
return
ret
;
return
ret
;
}
}
EXPORT_SYMBOL
(
lb_manual_suspend_ctrl
);
int
lb_suspend
(
struct
cros_ec_dev
*
ec
)
int
lb_suspend
(
struct
cros_ec_dev
*
ec
)
{
{
...
@@ -422,6 +421,7 @@ int lb_suspend(struct cros_ec_dev *ec)
...
@@ -422,6 +421,7 @@ int lb_suspend(struct cros_ec_dev *ec)
return
lb_send_empty_cmd
(
ec
,
LIGHTBAR_CMD_SUSPEND
);
return
lb_send_empty_cmd
(
ec
,
LIGHTBAR_CMD_SUSPEND
);
}
}
EXPORT_SYMBOL
(
lb_suspend
);
int
lb_resume
(
struct
cros_ec_dev
*
ec
)
int
lb_resume
(
struct
cros_ec_dev
*
ec
)
{
{
...
@@ -430,6 +430,7 @@ int lb_resume(struct cros_ec_dev *ec)
...
@@ -430,6 +430,7 @@ int lb_resume(struct cros_ec_dev *ec)
return
lb_send_empty_cmd
(
ec
,
LIGHTBAR_CMD_RESUME
);
return
lb_send_empty_cmd
(
ec
,
LIGHTBAR_CMD_RESUME
);
}
}
EXPORT_SYMBOL
(
lb_resume
);
static
ssize_t
sequence_store
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
static
ssize_t
sequence_store
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
const
char
*
buf
,
size_t
count
)
const
char
*
buf
,
size_t
count
)
...
@@ -622,3 +623,4 @@ struct attribute_group cros_ec_lightbar_attr_group = {
...
@@ -622,3 +623,4 @@ struct attribute_group cros_ec_lightbar_attr_group = {
.
attrs
=
__lb_cmds_attrs
,
.
attrs
=
__lb_cmds_attrs
,
.
is_visible
=
cros_ec_lightbar_attrs_are_visible
,
.
is_visible
=
cros_ec_lightbar_attrs_are_visible
,
};
};
EXPORT_SYMBOL
(
cros_ec_lightbar_attr_group
);
drivers/platform/chrome/cros_ec_sysfs.c
View file @
4398ef0e
...
@@ -34,8 +34,6 @@
...
@@ -34,8 +34,6 @@
#include <linux/types.h>
#include <linux/types.h>
#include <linux/uaccess.h>
#include <linux/uaccess.h>
#include "cros_ec_dev.h"
/* Accessor functions */
/* Accessor functions */
static
ssize_t
show_ec_reboot
(
struct
device
*
dev
,
static
ssize_t
show_ec_reboot
(
struct
device
*
dev
,
...
@@ -294,4 +292,7 @@ static struct attribute *__ec_attrs[] = {
...
@@ -294,4 +292,7 @@ static struct attribute *__ec_attrs[] = {
struct
attribute_group
cros_ec_attr_group
=
{
struct
attribute_group
cros_ec_attr_group
=
{
.
attrs
=
__ec_attrs
,
.
attrs
=
__ec_attrs
,
};
};
EXPORT_SYMBOL
(
cros_ec_attr_group
);
MODULE_LICENSE
(
"GPL"
);
MODULE_DESCRIPTION
(
"ChromeOS EC control driver"
);
drivers/platform/chrome/cros_ec_vbc.c
View file @
4398ef0e
...
@@ -135,3 +135,4 @@ struct attribute_group cros_ec_vbc_attr_group = {
...
@@ -135,3 +135,4 @@ struct attribute_group cros_ec_vbc_attr_group = {
.
bin_attrs
=
cros_ec_vbc_bin_attrs
,
.
bin_attrs
=
cros_ec_vbc_bin_attrs
,
.
is_bin_visible
=
cros_ec_vbc_is_visible
,
.
is_bin_visible
=
cros_ec_vbc_is_visible
,
};
};
EXPORT_SYMBOL
(
cros_ec_vbc_attr_group
);
include/linux/mfd/cros_ec.h
View file @
4398ef0e
...
@@ -322,6 +322,10 @@ extern struct attribute_group cros_ec_attr_group;
...
@@ -322,6 +322,10 @@ extern struct attribute_group cros_ec_attr_group;
extern
struct
attribute_group
cros_ec_lightbar_attr_group
;
extern
struct
attribute_group
cros_ec_lightbar_attr_group
;
extern
struct
attribute_group
cros_ec_vbc_attr_group
;
extern
struct
attribute_group
cros_ec_vbc_attr_group
;
/* debugfs stuff */
int
cros_ec_debugfs_init
(
struct
cros_ec_dev
*
ec
);
void
cros_ec_debugfs_remove
(
struct
cros_ec_dev
*
ec
);
/* ACPI GPE handler */
/* ACPI GPE handler */
#ifdef CONFIG_ACPI
#ifdef CONFIG_ACPI
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment