cregit-Linux how code gets into the kernel

Release 4.11 drivers/staging/greybus/bundle.h

/*
 * Greybus bundles
 *
 * Copyright 2014 Google Inc.
 * Copyright 2014 Linaro Ltd.
 *
 * Released under the GPLv2 only.
 */

#ifndef __BUNDLE_H

#define __BUNDLE_H

#include <linux/list.h>


#define	BUNDLE_ID_NONE	U8_MAX

/* Greybus "public" definitions" */

struct gb_bundle {
	
struct device		dev;
	
struct gb_interface	*intf;

	
u8			id;
	
u8			class;
	
u8			class_major;
	
u8			class_minor;

	
size_t			num_cports;
	
struct greybus_descriptor_cport *cport_desc;

	
struct list_head	connections;
	
u8			*state;

	
struct list_head	links;	/* interface->bundles */
};

#define to_gb_bundle(d) container_of(d, struct gb_bundle, dev)

/* Greybus "private" definitions" */
struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id,
				   u8 class);
int gb_bundle_add(struct gb_bundle *bundle);
void gb_bundle_destroy(struct gb_bundle *bundle);

/* Bundle Runtime PM wrappers */
#ifdef CONFIG_PM

static inline int gb_pm_runtime_get_sync(struct gb_bundle *bundle) { int retval; retval = pm_runtime_get_sync(&bundle->dev); if (retval < 0) { dev_err(&bundle->dev, "pm_runtime_get_sync failed: %d\n", retval); pm_runtime_put_noidle(&bundle->dev); return retval; } return 0; }

Contributors

PersonTokensPropCommitsCommitProp
David Lin59100.00%1100.00%
Total59100.00%1100.00%


static inline int gb_pm_runtime_put_autosuspend(struct gb_bundle *bundle) { int retval; pm_runtime_mark_last_busy(&bundle->dev); retval = pm_runtime_put_autosuspend(&bundle->dev); return retval; }

Contributors

PersonTokensPropCommitsCommitProp
David Lin36100.00%1100.00%
Total36100.00%1100.00%


static inline void gb_pm_runtime_get_noresume(struct gb_bundle *bundle) { pm_runtime_get_noresume(&bundle->dev); }

Contributors

PersonTokensPropCommitsCommitProp
David Lin20100.00%1100.00%
Total20100.00%1100.00%


static inline void gb_pm_runtime_put_noidle(struct gb_bundle *bundle) { pm_runtime_put_noidle(&bundle->dev); }

Contributors

PersonTokensPropCommitsCommitProp
David Lin20100.00%1100.00%
Total20100.00%1100.00%

#else
static inline int gb_pm_runtime_get_sync(struct gb_bundle *bundle) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
David Lin15100.00%1100.00%
Total15100.00%1100.00%


static inline int gb_pm_runtime_put_autosuspend(struct gb_bundle *bundle) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
David Lin15100.00%1100.00%
Total15100.00%1100.00%


static inline void gb_pm_runtime_get_noresume(struct gb_bundle *bundle) {}

Contributors

PersonTokensPropCommitsCommitProp
David Lin11100.00%1100.00%
Total11100.00%1100.00%


static inline void gb_pm_runtime_put_noidle(struct gb_bundle *bundle) {}

Contributors

PersonTokensPropCommitsCommitProp
David Lin11100.00%1100.00%
Total11100.00%1100.00%

#endif #endif /* __BUNDLE_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
David Lin19464.03%15.88%
Alex Elder4815.84%635.29%
Greg Kroah-Hartman3110.23%529.41%
Johan Hovold237.59%317.65%
Viresh Kumar72.31%211.76%
Total303100.00%17100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.