|
|
|
[RFC 3/4] remoteproc: Add API (header file) for kicking STE modems | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
|
From: Sjur Brændeland <sjur.brandeland@xxxxxxxxxxxxxx> Add the API definition for STE Modem interrupt mecanism (kicks). Signed-off-by: Sjur Brændeland <sjur.brandeland@xxxxxxxxxxxxxx> --- drivers/remoteproc/stemod_kick.h | 113 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 113 insertions(+), 0 deletions(-) create mode 100644 drivers/remoteproc/stemod_kick.h diff --git a/drivers/remoteproc/stemod_kick.h b/drivers/remoteproc/stemod_kick.h new file mode 100644 index 0000000..dbfa909 --- /dev/null +++ b/drivers/remoteproc/stemod_kick.h @@ -0,0 +1,113 @@ +/* + * Copyright (C) ST-Ericsson AB 2011 + * Author: Sjur Brendeland / sjur.brandeland@xxxxxxxxxxxxxx + * + * License terms: GNU General Public License (GPL) version 2 + */ + +#ifndef __INC_STEMOD_KICK_H +#define __INC_STEMOD_KICK_H +#include <linux/types.h> + +/** + * stemod_kick_subscribe - Subscribe for notification change from the modem. + * + * @notifyid: The notification ID the callback is associated with. + * + * @notify_cb: Callback function to be called when the requested notify-id + * is set by the external device (modem). + * + * @data: Client data to be provided in the callback function. + * + * Install a callback function for a notification ID. + * Returns negative upon error. + * + * This function may block, and cannot be called from IRQ context. + * Precondition: @notifyid must be defined as as getter in + * stemod_kick_notifyid_alloc(). + * Returns zero on success, and negative upon error. + * + * Callback context: + * The "notify_cb" callback might be called from the + * IRQ context. The callback function is not allowed to block + * or spend much CPU time in the callback, It must defer + * work to soft-IRQ or work queues. + */ +int stemod_kick_subscribe(int notifyid, + void (*notify_cb)(int notifyid, void *data), + void *data); + +/** + * stemod_kick_notifyid_alloc - Allocate the usage of notification IDs. + * + * @rx_mask: Bit-mask defining the notifyids that can be + * subscribed by stemod_kick_subscribe(). + * @tx_mask: Bit-mask defining the notifyids that can be set by + * stemod_kick_set_notifyid() + * + * The @rx_mask defines the notification-id that can be subscribed by + * the function stemod_kick_subscribe(). + * The @tx_mask defines the notification-ids that can be set by the + * function stemod_kick_set_notifyid(). + * + * This function may block. + * + * Returns zero on success, and negative upon error. + * + */ +int stemod_kick_notifyid_alloc(u32 rx_mask, u32 tx_mask); + +/** + * stemod_kick_register_errhandler - Register an error handler. + * + * @errhandler: error handler called from driver upon severe errors + * that requires reset of the remote device. + */ +void stemod_kick_register_errhandler(void (*errhandler)(int errno)); + +/** + * stemod_kick_reset() - Reset the C2C driver + * + * Reset the Kick Driver due to remote device (modem) restart. + * This shall reset state back to initial state, and should only + * be used when remote device (modem) has reset. + * + * All settings, subscriptions and state information in the driver is + * reset. + * This function may block. + * + * Returns zero on success, and negative upon error. + */ +int stemod_kick_reset(void); + +/** + * stemod_kick_notifyid() - Genereate a notification to remote device. + * + * @notifyid: The notification ID to generate interrupt for. + * + * This function is used to send notification to the remote + * processor (modem). + * + * This function is non-blocking, and can be called from Soft-IRQ context. + * + * Returns zero on success, and negative upon error. + * + * Precondition: @notifyid must be defined as as setter in + * stemod_kick_notifyid_alloc(). + */ +int stemod_kick_notifyid(int notifyid); + + +/** + * stemod_power() - On/Off switch for modem + * + * @on: Switch on or off + * + * This function is the power switch for the STE-Modem. + * + * Returns zero on success, and negative upon error. + * + */ +int stemod_power(bool on); + +#endif /*INC_STEMOD_KICK_H*/ -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[Other Archives] [Linux Kernel Newbies] [Linux Driver Development] [Linux Kbuild] [Fedora Kernel] [Linux Kernel Testers] [Linux SH] [Linux Omap] [Linux Tape] [Linux Input] [Linux Kernel Janitors] [Linux Kernel Packagers] [Linux Doc] [Linux Man Pages] [Linux API] [Linux Memory Management] [Linux Modules] [Linux Standards] [Kernel Announce] [Netdev] [Git] [Linux PCI] Linux CAN Development [Linux I2C] [Linux RDMA] [Linux NUMA] [Netfilter] [Netfilter Devel] [SELinux] [Bugtraq] [FIO] [Linux Perf Users] [Linux Serial] [Linux PPP] [Linux ISDN] [Linux Next] [Kernel Stable Commits] [Linux Tip Commits] [Kernel MM Commits] [Linux Security Module] [AutoFS] [Filesystem Development] [Ext3 Filesystem] [Linux bcache] [Ext4 Filesystem] [Linux BTRFS] [Linux CEPH Filesystem] [Linux XFS] [XFS] [Linux NFS] [Linux CIFS] [Ecryptfs] [Linux NILFS] [Linux Cachefs] [Reiser FS] [Initramfs] [Linux FB Devel] [Linux OpenGL] [DRI Devel] [Fastboot] [Linux RT Users] [Linux RT Stable] [eCos] [Corosync] [Linux Clusters] [LVS Devel] [Hot Plug] [Linux Virtualization] [KVM] [KVM PPC] [KVM ia64] [Linux Containers] [Linux Hexagon] [Linux Cgroups] [Util Linux] [Wireless] [Linux Bluetooth] [Bluez Devel] [Ethernet Bridging] [Embedded Linux] [Barebox] [Linux MMC] [Linux IIO] [Sparse] [Smatch] [Linux Arch] [x86 Platform Driver] [Linux ACPI] [Linux IBM ACPI] [LM Sensors] [CPU Freq] [Linux Power Management] [Linmodems] [Linux DCCP] [Linux SCTP] [ALSA Devel] [Linux USB] [Linux PA RISC] [Linux Samsung SOC] [MIPS Linux] [IBM S/390 Linux] [ARM Linux] [ARM Kernel] [ARM MSM] [Tegra Devel] [Sparc Linux] [Linux Security] [Linux Sound] [Linux Media] [Video 4 Linux] [Linux IRDA Users] [Linux for the blind] [Linux RAID] [Linux ATA RAID] [Device Mapper] [Linux SCSI] [SCSI Target Devel] [Linux SCSI Target Infrastructure] [Linux IDE] [Linux SMP] [Linux AXP] [Linux Alpha] [Linux M68K] [Linux ia64] [Linux 8086] [Linux x86_64] [Linux Config] [Linux Apps] [Linux MSDOS] [Linux X.25] [Linux Crypto] [DM Crypt] [Linux Trace Users] [Linux Btrace] [Linux Watchdog] [Utrace Devel] [Linux C Programming] [Linux Assembly] [Dash] [DWARVES] [Hail Devel] [Linux Kernel Debugger] [Linux gcc] [Gcc Help] [X.Org] [Wine]
![]() |
![]() |
[Older Kernel Discussion] [Yosemite National Park Forum] [Large Format Photos] [Gimp] [Yosemite Photos] [Stuff]