#include #include #include #include "internal.h" #include "nfs3_fs.h" #ifdef CONFIG_NFS_V3_ACL static struct rpc_stat nfsacl_rpcstat = { &nfsacl_program }; static const struct rpc_version *nfsacl_version[] = { [3] = &nfsacl_version3, }; const struct rpc_program nfsacl_program = { .name = "nfsacl", .number = NFS_ACL_PROGRAM, .nrvers = ARRAY_SIZE(nfsacl_version), .version = nfsacl_version, .stats = &nfsacl_rpcstat, }; /* * Initialise an NFSv3 ACL client connection */ static void nfs_init_server_aclclient(struct nfs_server *server) { if (server->flags & NFS_MOUNT_NOACL) goto out_noacl; server->client_acl = rpc_bind_new_program(server->client, &nfsacl_program, 3); if (IS_ERR(server->client_acl)) goto out_noacl; /* No errors! Assume that Sun nfsacls are supported */ server->caps |= NFS_CAP_ACLS; return; out_noacl: server->caps &= ~NFS_CAP_ACLS; } #else static inline void nfs_init_server_aclclient(struct nfs_server *server) { server->flags &= ~NFS_MOUNT_NOACL; server->caps &= ~NFS_CAP_ACLS; } #endif struct nfs_server *nfs3_create_server(struct nfs_mount_info *mount_info, struct nfs_subversion *nfs_mod) { struct nfs_server *server = nfs_create_server(mount_info, nfs_mod); /* Create a client RPC handle for the NFS v3 ACL management interface */ if (!IS_ERR(server)) nfs_init_server_aclclient(server); return server; } struct nfs_server *nfs3_clone_server(struct nfs_server *source, struct nfs_fh *fh, struct nfs_fattr *fattr, rpc_authflavor_t flavor) { struct nfs_server *server = nfs_clone_server(source, fh, fattr, flavor); if (!IS_ERR(server) && !IS_ERR(source->client_acl)) nfs_init_server_aclclient(server); return server; } /* * Set up a pNFS Data Server client over NFSv3. * * Return any existing nfs_client that matches server address,port,version * and minorversion. * * For a new nfs_client, use a soft mount (default), a low retrans and a * low timeout interval so that if a connection is lost, we retry through * the MDS. */ struct nfs_client *nfs3_set_ds_client(struct nfs_server *mds_srv, const struct sockaddr *ds_addr, int ds_addrlen, int ds_proto, unsigned int ds_timeo, unsigned int ds_retrans) { struct rpc_timeout ds_timeout; struct nfs_client *mds_clp = mds_srv->nfs_client; struct nfs_client_initdata cl_init = { .addr = ds_addr, .addrlen = ds_addrlen, .nodename = mds_clp->cl_rpcclient->cl_nodename, .ip_addr = mds_clp->cl_ipaddr, .nfs_mod = &nfs_v3, .proto = ds_proto, .net = mds_clp->cl_net, .timeparms = &ds_timeout, }; struct nfs_client *clp; char buf[INET6_ADDRSTRLEN + 1]; /* fake a hostname because lockd wants it */ if (rpc_ntop(ds_addr, buf, sizeof(buf)) <= 0) return ERR_PTR(-EINVAL); cl_init.hostname = buf; if (mds_srv->flags & NFS_MOUNT_NORESVPORT) set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags); /* Use the MDS nfs_client cl_ipaddr. */ nfs_init_timeout_values(&ds_timeout, ds_proto, ds_timeo, ds_retrans); clp = nfs_get_client(&cl_init); return clp; } EXPORT_SYMBOL_GPL(nfs3_set_ds_client); 609d2d9f0e5cfc351a4807ef8d0'>dt-bindings/pinctrl/qcom,pmic-mpp.h
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2016-11-11 11:12:43 +0800
committerMark Brown <broonie@kernel.org>2016-11-11 15:34:45 +0000
commit618c808968852609d2d9f0e5cfc351a4807ef8d0 (patch)
tree01a8d928c06fe7bef488f55bade6ba37b958bb5f /include/dt-bindings/pinctrl/qcom,pmic-mpp.h
parent1001354ca34179f3db924eb66672442a173147dc (diff)
regulator: axp20x: Fix axp809 ldo_io registration error on cold boot
The maximum supported voltage for ldo_io# is 3.3V, but on cold boot the selector comes up at 0x1f, which maps to 3.8V. This was previously corrected by Allwinner's U-boot, which set all regulators on the PMICs to some pre-configured voltage. With recent progress in U-boot SPL support, this is no longer the case. In any case we should handle this quirk in the kernel driver as well. This invalid setting causes _regulator_get_voltage() to fail with -EINVAL which causes regulator registration to fail when constrains are used: [ 1.054181] vcc-pg: failed to get the current voltage(-22) [ 1.059670] axp20x-regulator axp20x-regulator.0: Failed to register ldo_io0 [ 1.069749] axp20x-regulator: probe of axp20x-regulator.0 failed with error -22 This commits makes the axp20x regulator driver accept the 0x1f register value, fixing this. The datasheet does not guarantee reliable operation above 3.3V, so on boards where this regulator is used the regulator-max-microvolt setting must be 3.3V or less. This is essentially the same as the commit f40d4896bf32 ("regulator: axp20x: Fix axp22x ldo_io registration error on cold boot") for AXP22x PMICs. Fixes: a51f9f4622a3 ("regulator: axp20x: support AXP809 variant") Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/dt-bindings/pinctrl/qcom,pmic-mpp.h')